/* ==========================================================================
   Baby Name Generator - Playful Purple/Violet Theme
   ========================================================================== */

/* Header title white on purple */
.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
   ========================================================================== */
.name-results {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #ddd6fe 100%);
    border-radius: 16px;
    border: 2px solid #a78bfa;
    position: relative;
    overflow: hidden;
}

.name-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); }
}

.name-results.hidden {
    display: none;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.results-title {
    color: #7c3aed;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.results-count {
    font-size: 0.9rem;
    color: #8b5cf6;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #c4b5fd;
}

/* ==========================================================================
   Names Grid
   ========================================================================== */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Name Card */
.name-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.name-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
    border-color: #a78bfa;
}

.name-card.favorited {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
}

@keyframes fadeInUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Name Header */
.name-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.name-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1.2;
}

/* Favorite Button */
.favorite-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.active {
    animation: heartPop 0.4s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Name Meta (gender, style tags) */
.name-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.name-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    text-transform: capitalize;
}

.name-tag.gender-boy {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.name-tag.gender-girl {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
    border: 1px solid #f9a8d4;
}

.name-tag.gender-neutral {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #15803d;
    border: 1px solid #86efac;
}

.name-tag.style-tag {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

/* Name Meaning */
.name-meaning {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    font-style: italic;
}

.name-meaning::before {
    content: '"';
}

.name-meaning::after {
    content: '"';
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #7c3aed;
}

.no-results.hidden {
    display: none;
}

.no-results-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.no-results p {
    font-size: 1rem;
    margin: 0;
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.generate-again-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: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.generate-again-button:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.clear-favorites-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;
    background: white;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.clear-favorites-button:hover {
    background: #fef2f2;
    transform: translateY(-2px);
}

.clear-favorites-button.hidden {
    display: none;
}

.share-trigger-btn {
    background: white;
    color: #8b5cf6;
    border: 2px solid #8b5cf6;
}

.share-trigger-btn:hover {
    background: #f5f3ff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Favorites Section
   ========================================================================== */
.favorites-section {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
    border-radius: 16px;
    border: 2px solid #f9a8d4;
}

.favorites-section.hidden {
    display: none;
}

.favorites-header {
    margin-bottom: 16px;
}

.favorites-header h3 {
    color: #be185d;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-header .heart-icon {
    font-size: 1.25rem;
}

.favorites-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.favorite-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #be185d;
    border: 1px solid #f9a8d4;
    transition: all 0.2s ease;
}

.favorite-chip:hover {
    background: #fdf2f8;
}

.favorite-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.favorite-remove:hover {
    color: #ef4444;
}

/* ==========================================================================
   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 (Purple Theme Accordion)
   ========================================================================== */
.babyname-faq-section {
    margin-top: 32px;
    padding: 24px 20px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #f5f3ff 100%);
    border-radius: 20px;
    border: 2px solid #c4b5fd;
}

.babyname-faq-section h2 {
    text-align: center;
    color: #7c3aed;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Override base FAQ styles for purple theme */
.babyname-faq-section .faq-list {
    gap: 12px;
}

.babyname-faq-section .faq-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
    border: 1px solid #ddd6fe;
    transition: all 0.3s ease;
    overflow: hidden;
}

.babyname-faq-section .faq-item[open] {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.15);
}

.babyname-faq-section .faq-question {
    padding: 16px 20px;
    color: #7c3aed;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.babyname-faq-section .faq-question::after {
    border-color: #7c3aed;
}

.babyname-faq-section .faq-question:hover {
    background: rgba(139, 92, 246, 0.05);
}

.babyname-faq-section .faq-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.babyname-faq-section .faq-answer {
    padding: 0 20px 16px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.babyname-faq-section .faq-answer p {
    margin: 0 0 12px 0;
}

.babyname-faq-section .faq-answer p:last-child {
    margin-bottom: 0;
}

.babyname-faq-section .faq-answer ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.babyname-faq-section .faq-answer ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.babyname-faq-section .faq-answer ul li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #a78bfa;
    border-radius: 50%;
}

/* Disclaimer at bottom */
.babyname-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 #c4b5fd;
}

.babyname-disclaimer span {
    color: #8b5cf6;
}

/* ==========================================================================
   Generate 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: 600px) {
    .names-grid {
        grid-template-columns: 1fr;
    }

    .name-card {
        padding: 16px;
    }

    .name-text {
        font-size: 1.25rem;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .name-results {
        padding: 16px;
        border-radius: 12px;
    }

    .name-meta {
        gap: 6px;
    }

    .name-tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .generate-again-button,
    .clear-favorites-button,
    .share-trigger-btn {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }

    /* FAQ mobile */
    .babyname-faq-section {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .babyname-faq-section h2 {
        font-size: 1.25rem;
    }

    .babyname-disclaimer {
        padding: 14px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
    }

    .favorites-grid {
        gap: 8px;
    }

    .favorite-chip {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
