/**
 * Smart Offers CSS - Resto M2
 * Faz 3: Akıllı Öneriler Stilleri
 */

/* ============================================
   Time-Based Banner
   ============================================ */

.smart-offer-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-offer-banner .offer-icon {
    font-size: 28px;
}

.smart-offer-banner .offer-content {
    flex: 1;
}

.smart-offer-banner .offer-content strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.smart-offer-banner .offer-content span {
    font-size: 13px;
    opacity: 0.9;
}

.smart-offer-banner .offer-action {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.smart-offer-banner .offer-action:hover {
    background: rgba(255, 255, 255, 0.3);
}

.smart-offer-banner .offer-dismiss {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.smart-offer-banner .offer-dismiss:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Banner Variants */
.smart-offer-banner[data-type="breakfast"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.smart-offer-banner[data-type="happy_hour"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.smart-offer-banner[data-type="night"] {
    background: linear-gradient(135deg, #0c3483 0%, #a2b6df 100%);
}

/* ============================================
   Weekend Special Badge
   ============================================ */

.weekend-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   Tooltip Offers
   ============================================ */

.smart-offer-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.smart-offer-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.smart-offer-tooltip .tooltip-icon {
    font-size: 18px;
}

.smart-offer-tooltip.favorite-suggest {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* ============================================
   Modal Offers (Indecision, Upsell)
   ============================================ */

.smart-offer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.smart-offer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.smart-offer-content {
    position: relative;
    width: 90%;
    max-width: 380px;
    padding: 35px;
    background: #fff;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.smart-offer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #f1f3f5;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.smart-offer-close:hover {
    background: #e9ecef;
    color: #333;
}

.smart-offer-content .offer-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.smart-offer-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px;
}

.smart-offer-content p {
    font-size: 15px;
    color: #6c757d;
    margin: 0 0 25px;
    line-height: 1.5;
}

.smart-offer-cta {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.smart-offer-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.smart-offer-dismiss-btn {
    display: block;
    margin: 15px auto 0;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.smart-offer-dismiss-btn:hover {
    color: #6c757d;
}

/* Dessert Upsell Variant */
.smart-offer-modal.dessert-upsell .smart-offer-cta {
    background: linear-gradient(135deg, #fd7e14, #e74c3c);
}

/* ============================================
   Highlighted Items
   ============================================ */

.resto-menu-item.highlighted {
    animation: highlightPulse 2s ease infinite;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.3);
}

@keyframes highlightPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.3);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(231, 76, 60, 0.2);
    }
}

/* ============================================
   Popular Items Modal
   ============================================ */

.popular-items-modal .smart-offer-content {
    max-width: 500px;
    padding: 30px;
}

.popular-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.popular-item-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.popular-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.popular-item-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.popular-item-img-placeholder {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
}

.popular-item-img-placeholder svg {
    width: 40px;
    height: 40px;
}

.popular-item-info {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.popular-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.popular-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #e74c3c;
    white-space: nowrap;
}

/* Kampanya fiyatı */
.popular-item-price.campaign {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.popular-item-price.campaign del {
    font-size: 11px;
    font-weight: 500;
    color: #adb5bd;
    text-decoration: line-through;
}

.popular-item-price.campaign .arrow {
    color: #6c757d;
    font-size: 10px;
}

.popular-item-price.campaign ins {
    font-size: 13px;
    font-weight: 700;
    color: #27ae60;
    text-decoration: none;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .smart-offer-banner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }

    .smart-offer-banner .offer-action {
        flex: 1;
        text-align: center;
    }

    .smart-offer-content {
        padding: 25px 20px;
    }

    .smart-offer-content h3 {
        font-size: 18px;
    }

    .smart-offer-tooltip {
        font-size: 12px;
        padding: 10px 16px;
        max-width: 90%;
        white-space: normal;
        text-align: center;
    }
}