/* ==========================================================================
   Pizza Calculator - Warm Orange Theme Styles
   ========================================================================== */

/* Header title white on orange */
.calculator-wrapper h1 {
    color: #ffffff;
}

/* Calculator wrapper - relative for sparkle effects */
.calculator-wrapper {
    position: relative;
    overflow: hidden;
}

/* Button icon styling */
.btn-icon {
    display: inline-block;
    font-size: 1.25rem;
    margin-right: 4px;
}

/* ==========================================================================
   Results Section
   ========================================================================== */
.pizza-results {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    border-radius: 16px;
    border: 2px solid #fb923c;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pizza-results::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    animation: shimmer 3s infinite linear;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.pizza-results.hidden {
    display: none;
}

/* ==========================================================================
   Primary Result Display
   ========================================================================== */
.result-display {
    margin-bottom: 20px;
}

.result-number {
    font-size: 4rem;
    font-weight: 700;
    color: #ea580c;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-label {
    font-size: 1.1rem;
    color: #c2410c;
    font-weight: 600;
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    background: white;
    border-radius: 12px;
    padding: 16px 12px;
    border: 1px solid #fdba74;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ea580c;
}

.stat-label {
    font-size: 0.75rem;
    color: #9a3412;
    font-weight: 500;
    text-align: center;
}

/* ==========================================================================
   Fun Message
   ========================================================================== */
.fun-message {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #78350f;
    font-size: 1rem;
    line-height: 1.5;
    border: 1px dashed #fb923c;
    animation: fadeIn 0.5s ease-out 0.4s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.recalculate-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: #ea580c;
    color: white;
}

.recalculate-button:hover {
    background: #c2410c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}

.share-trigger-btn {
    background: white;
    color: #ea580c;
    border: 2px solid #ea580c;
}

.share-trigger-btn:hover {
    background: #fff7ed;
    transform: translateY(-2px);
}

/* ==========================================================================
   Sparkle Effects
   ========================================================================== */
.sparkle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.sparkle {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: sparkle 1.5s ease-out forwards;
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-50px) scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5) rotate(360deg);
    }
}

/* ==========================================================================
   FAQ Section (Pizza Theme Accordion)
   ========================================================================== */
.pizza-faq-section {
    margin-top: 32px;
    padding: 24px 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fff7ed 100%);
    border-radius: 20px;
    border: 2px solid #fdba74;
}

.pizza-faq-section h2 {
    text-align: center;
    color: #ea580c;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Override base FAQ styles for pizza theme */
.pizza-faq-section .faq-list {
    gap: 12px;
}

.pizza-faq-section .faq-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.1);
    border: 1px solid #fed7aa;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pizza-faq-section .faq-item[open] {
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.15);
}

.pizza-faq-section .faq-question {
    padding: 16px 20px;
    color: #ea580c;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pizza-faq-section .faq-question::after {
    border-color: #ea580c;
}

.pizza-faq-section .faq-question:hover {
    background: rgba(249, 115, 22, 0.05);
}

.pizza-faq-section .faq-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pizza-faq-section .faq-answer {
    padding: 0 20px 16px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.pizza-faq-section .faq-answer p {
    margin: 0 0 12px 0;
}

.pizza-faq-section .faq-answer p:last-child {
    margin-bottom: 0;
}

.pizza-faq-section .faq-answer ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.pizza-faq-section .faq-answer ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.pizza-faq-section .faq-answer ul li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #fb923c;
    border-radius: 50%;
}

/* Disclaimer at bottom */
.pizza-disclaimer {
    margin-top: 28px;
    padding: 16px 20px;
    background: white;
    border-radius: 30px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 2px dashed #fdba74;
}

.pizza-disclaimer span {
    color: #f97316;
}

/* ==========================================================================
   Calculate Button Animation
   ========================================================================== */
.calculate-button {
    position: relative;
    overflow: hidden;
}

.calculate-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.calculate-button:active::after {
    width: 300px;
    height: 300px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .result-number {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-item {
        padding: 12px 8px;
    }

    .stat-icon {
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .fun-message {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .recalculate-button,
    .share-trigger-btn {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }

    /* FAQ mobile */
    .pizza-faq-section {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .pizza-faq-section h2 {
        font-size: 1.25rem;
    }

    .pizza-disclaimer {
        padding: 14px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
    }
}
