/**
 * Smart Upsell - AI Chef Tip Styles
 * Compact, non-intrusive suggestion line
 */

/* ============================================
   UPSELL CONTAINER - Minimal single line
   Positioned closer to price with negative margin
   ============================================ */
.upsell-box {
    margin-top: 8px;
    padding: 0;
    text-align: center;
    animation: upsellFadeIn 0.4s ease-out;
    position: relative;
    z-index: 1;
    width: 100%;
    clear: both;
    display: block;
}

@keyframes upsellFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   UPSELL HEADER - Hidden
   ============================================ */
.upsell-header {
    display: none;
}

/* ============================================
   UPSELL CONTENT - Compact inline layout
   ============================================ */
.upsell-content {
    padding: 0;
    line-height: 1.5;
}

/* Intro text - highlighted as suggestion indicator */
.upsell-intro {
    font-size: 12px;
    color: #a78bfa;
    font-weight: 500;
    margin-right: 4px;
}

/* Item name - highlighted inline */
.upsell-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
}

/* Price - inline after name */
.upsell-price {
    display: none;
}

.upsell-price.visible {
    display: inline;
    font-size: 12px;
    font-weight: 600;
    color: #34d399;
    margin-left: 6px;
}

/* Reason - smaller text below */
.upsell-reason {
    display: none;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
    margin-top: 4px;
    font-style: italic;
}

.upsell-reason.visible {
    display: block;
}

/* ============================================
   LOADING STATE - Animated chef thinking
   ============================================ */
.upsell-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 0;
}

.upsell-loading.visible {
    display: flex;
}

.upsell-loading-icon {
    font-size: 16px;
    animation: upsellChefBounce 1s ease-in-out infinite;
}

.upsell-loading-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.upsell-loading-dots {
    display: inline-flex;
    gap: 2px;
}

.upsell-loading-dots span {
    width: 4px;
    height: 4px;
    background: #a78bfa;
    border-radius: 50%;
    animation: upsellDotPulse 1.4s ease-in-out infinite;
}

.upsell-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.upsell-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes upsellChefBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes upsellDotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   LIGHT THEME
   ============================================ */
.light-theme .upsell-box,
.menu-light .upsell-box,
[data-theme="light"] .upsell-box {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.light-theme .upsell-intro,
.menu-light .upsell-intro,
[data-theme="light"] .upsell-intro {
    color: #7c3aed;
}

.light-theme .upsell-item-name,
.menu-light .upsell-item-name,
[data-theme="light"] .upsell-item-name {
    color: #d97706;
}

.light-theme .upsell-reason,
.menu-light .upsell-reason,
[data-theme="light"] .upsell-reason {
    color: rgba(0, 0, 0, 0.45);
}

.light-theme .upsell-price.visible,
.menu-light .upsell-price.visible,
[data-theme="light"] .upsell-price.visible {
    color: #059669;
}

.light-theme .upsell-loading-text,
.menu-light .upsell-loading-text,
[data-theme="light"] .upsell-loading-text {
    color: rgba(0, 0, 0, 0.5);
}

.light-theme .upsell-loading-dots span,
.menu-light .upsell-loading-dots span,
[data-theme="light"] .upsell-loading-dots span {
    background: #7c3aed;
}

/* ============================================
   ERROR STATE - Fun fallback messages
   ============================================ */
.upsell-error {
    display: none;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 4px 0;
    font-style: italic;
}

.upsell-error.visible {
    display: block;
    animation: upsellFadeIn 0.4s ease-out;
}

/* Light theme for error */
.light-theme .upsell-error,
.menu-light .upsell-error,
[data-theme="light"] .upsell-error {
    color: rgba(0, 0, 0, 0.6);
}
