/* ==========================================
   RAMADAN COUNTDOWN WIDGET GENERATOR
   MakkahCompass Theme - Dark Celestial with Gold Accents
   ========================================== */

/* ==========================================
   1. CSS VARIABLES
   ========================================== */
.widget-page {
    --midnight: #0A1628;
    --deep-space: #0F1D32;
    --night-blue: #152238;
    --twilight: #1E3050;
    --gold: #D4A941;
    --gold-light: #E8D5A3;
    --gold-bright: #F5C84C;
    --cream: #F5F5F0;
    --pearl: #E8E8E3;
    --mist: #94A3B8;
    --slate: #64748B;
    --emerald: #10B981;
    --emerald-dark: #059669;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(212, 169, 65, 0.2);
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
}

/* ==========================================
   2. PAGE CONTAINER
   ========================================== */
.widget-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg);
    font-family: var(--font-body);
    color: var(--cream);
    line-height: 1.6;
}

/* ==========================================
   3. LANGUAGE SWITCHER
   ========================================== */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.lang-btn {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    color: var(--mist);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    background: var(--twilight);
    color: var(--cream);
}

.lang-btn.active {
    background: var(--gold);
    color: var(--midnight);
    border-color: var(--gold);
    font-weight: 600;
}

/* ==========================================
   4. HERO SECTION
   ========================================== */
.hero-section {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    background: linear-gradient(180deg, var(--deep-space) 0%, var(--midnight) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    border: 1px solid var(--twilight);
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 0 20px rgba(212, 169, 65, 0.4));
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--gold);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--pearl);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   5. SECTION STYLES
   ========================================== */
section {
    margin-bottom: var(--space-3xl);
}

section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: var(--space-md);
}

.section-desc {
    text-align: center;
    color: var(--mist);
    margin-bottom: var(--space-xl);
}

/* ==========================================
   6. PREVIEW SECTION
   ========================================== */
.preview-container {
    background: var(--night-blue);
    border: 2px dashed var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.widget-preview {
    width: 100%;
    max-width: 400px;
}

/* ==========================================
   7. CUSTOMIZATION SECTION
   ========================================== */
.customize-grid {
    display: grid;
    gap: var(--space-xl);
}

.customize-card {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.customize-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--gold-light);
    margin-bottom: var(--space-lg);
}

/* Theme Options */
.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
}

.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--deep-space);
    border: 2px solid var(--twilight);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--mist);
    font-size: 0.875rem;
}

.theme-btn:hover {
    border-color: var(--gold);
    color: var(--cream);
}

.theme-btn.active {
    border-color: var(--gold);
    background: var(--twilight);
    color: var(--cream);
}

.theme-preview {
    width: 60px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-preview.dark-gold {
    background: linear-gradient(135deg, #0A1628 50%, #D4A941 50%);
}

.theme-preview.light-green {
    background: linear-gradient(135deg, #F0FDF4 50%, #10B981 50%);
}

.theme-preview.midnight-blue {
    background: linear-gradient(135deg, #1E3A5F 50%, #60A5FA 50%);
}

.theme-preview.minimal-white {
    background: linear-gradient(135deg, #FFFFFF 50%, #374151 50%);
}

/* Widget Language Options */
.widget-lang-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.widget-lang-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--deep-space);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-full);
    color: var(--mist);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.widget-lang-btn:hover {
    background: var(--twilight);
    color: var(--cream);
}

.widget-lang-btn.active {
    background: var(--gold);
    color: var(--midnight);
    border-color: var(--gold);
    font-weight: 600;
}

/* Size Options */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.size-btn {
    flex: 1;
    min-width: 100px;
    padding: var(--space-md);
    background: var(--deep-space);
    border: 2px solid var(--twilight);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    color: var(--mist);
}

.size-btn span {
    display: block;
}

.size-btn span:first-child {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.size-dim {
    font-size: 0.75rem;
    color: var(--slate);
}

.size-btn:hover {
    border-color: var(--gold);
    color: var(--cream);
}

.size-btn.active {
    border-color: var(--gold);
    background: var(--twilight);
    color: var(--cream);
}

/* ==========================================
   8. EMBED CODE SECTION
   ========================================== */
.embed-box {
    background: var(--night-blue);
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--deep-space);
    border-bottom: 1px solid var(--twilight);
}

.code-header span {
    font-weight: 600;
    color: var(--gold-light);
}

.btn-copy {
    padding: var(--space-sm) var(--space-md);
    background: var(--gold);
    color: var(--midnight);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-copy:hover {
    background: var(--gold-bright);
}

.btn-copy.copied {
    background: var(--emerald);
    color: white;
}

.embed-code {
    margin: 0;
    padding: var(--space-lg);
    background: var(--midnight);
    overflow-x: auto;
}

.embed-code code {
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--gold-light);
    white-space: pre-wrap;
    word-break: break-all;
}

.embed-instructions {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
}

.embed-instructions h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--gold-light);
    margin-bottom: var(--space-md);
}

.embed-instructions ol {
    padding-left: var(--space-xl);
    color: var(--pearl);
}

.embed-instructions li {
    margin-bottom: var(--space-sm);
}

/* ==========================================
   9. PLATFORMS SECTION
   ========================================== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.platform-card {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
}

.platform-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.platform-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--gold-light);
    margin-bottom: var(--space-sm);
}

.platform-card p {
    font-size: 0.9rem;
    color: var(--mist);
    margin: 0;
}

/* ==========================================
   10. FEATURES SECTION
   ========================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--gold-light);
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--mist);
    margin: 0;
}

/* ==========================================
   11. EDUCATIONAL CONTENT
   ========================================== */
.educational-content {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.educational-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    margin: var(--space-xl) 0 var(--space-md);
    text-align: left;
}

.educational-content h2:first-child {
    margin-top: 0;
}

.educational-content h3 {
    font-size: 1.25rem;
    color: var(--gold-light);
    margin: var(--space-lg) 0 var(--space-md);
}

.educational-content p {
    color: var(--pearl);
    margin-bottom: var(--space-md);
}

.educational-content ul,
.educational-content ol {
    color: var(--pearl);
    padding-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

.educational-content li {
    margin-bottom: var(--space-sm);
}

/* ==========================================
   12. FAQ SECTION
   ========================================== */
.faq-section h2 {
    margin-bottom: var(--space-xl);
}

.faq-item {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    font-size: 1.125rem;
    color: var(--gold-light);
    padding: var(--space-lg);
    margin: 0;
    cursor: pointer;
}

.faq-question:hover {
    background: var(--twilight);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--pearl);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================
   13. RELATED TOOLS
   ========================================== */
.related-tools-section h2 {
    margin-bottom: var(--space-xl);
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.related-tool-card {
    background: var(--night-blue);
    border: 1px solid var(--twilight);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-decoration: none;
    transition: all var(--transition-base);
}

.related-tool-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.related-tool-card h3 {
    font-size: 1.125rem;
    color: var(--gold-light);
    margin: 0 0 var(--space-sm);
}

.related-tool-card p {
    font-size: 0.9rem;
    color: var(--mist);
    margin: 0;
}

/* ==========================================
   14. WIDGET THEMES (for preview)
   ========================================== */

/* Dark Gold Theme */
.mc-widget.theme-dark-gold {
    background: linear-gradient(135deg, #0A1628 0%, #152238 100%);
    border: 1px solid #D4A941;
    border-radius: 12px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #F5F5F0;
    text-align: center;
}

.mc-widget.theme-dark-gold .mc-widget-title {
    color: #D4A941;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.mc-widget.theme-dark-gold .mc-countdown {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mc-widget.theme-dark-gold .mc-unit {
    background: rgba(212, 169, 65, 0.1);
    border: 1px solid rgba(212, 169, 65, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 60px;
}

.mc-widget.theme-dark-gold .mc-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #D4A941;
    display: block;
}

.mc-widget.theme-dark-gold .mc-label {
    font-size: 0.7rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-widget.theme-dark-gold .mc-date {
    font-size: 0.85rem;
    color: #94A3B8;
}

/* Light Green Theme */
.mc-widget.theme-light-green {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1px solid #10B981;
    border-radius: 12px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1F2937;
    text-align: center;
}

.mc-widget.theme-light-green .mc-widget-title {
    color: #059669;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.mc-widget.theme-light-green .mc-countdown {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mc-widget.theme-light-green .mc-unit {
    background: white;
    border: 1px solid #10B981;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 60px;
}

.mc-widget.theme-light-green .mc-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #10B981;
    display: block;
}

.mc-widget.theme-light-green .mc-label {
    font-size: 0.7rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-widget.theme-light-green .mc-date {
    font-size: 0.85rem;
    color: #6B7280;
}

/* Midnight Blue Theme */
.mc-widget.theme-midnight-blue {
    background: linear-gradient(135deg, #1E3A5F 0%, #0F172A 100%);
    border: 1px solid #60A5FA;
    border-radius: 12px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #F1F5F9;
    text-align: center;
}

.mc-widget.theme-midnight-blue .mc-widget-title {
    color: #60A5FA;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.mc-widget.theme-midnight-blue .mc-countdown {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mc-widget.theme-midnight-blue .mc-unit {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 60px;
}

.mc-widget.theme-midnight-blue .mc-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #60A5FA;
    display: block;
}

.mc-widget.theme-midnight-blue .mc-label {
    font-size: 0.7rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-widget.theme-midnight-blue .mc-date {
    font-size: 0.85rem;
    color: #94A3B8;
}

/* Minimal White Theme */
.mc-widget.theme-minimal-white {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1F2937;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mc-widget.theme-minimal-white .mc-widget-title {
    color: #374151;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.mc-widget.theme-minimal-white .mc-countdown {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mc-widget.theme-minimal-white .mc-unit {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 60px;
}

.mc-widget.theme-minimal-white .mc-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    display: block;
}

.mc-widget.theme-minimal-white .mc-label {
    font-size: 0.7rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-widget.theme-minimal-white .mc-date {
    font-size: 0.85rem;
    color: #6B7280;
}

/* Widget Size Variants */
.mc-widget.size-small {
    max-width: 300px;
    padding: 16px;
}

.mc-widget.size-small .mc-widget-title {
    font-size: 1rem;
}

.mc-widget.size-small .mc-unit {
    padding: 8px 12px;
    min-width: 50px;
}

.mc-widget.size-small .mc-value {
    font-size: 1.25rem;
}

.mc-widget.size-small .mc-label {
    font-size: 0.65rem;
}

.mc-widget.size-medium {
    max-width: 400px;
}

.mc-widget.size-large {
    max-width: 100%;
}

.mc-widget.size-large .mc-widget-title {
    font-size: 1.5rem;
}

.mc-widget.size-large .mc-unit {
    padding: 16px 20px;
    min-width: 80px;
}

.mc-widget.size-large .mc-value {
    font-size: 2.25rem;
}

/* RTL Support for Widget */
.mc-widget[dir="rtl"] .mc-countdown {
    direction: ltr;
}

/* ==========================================
   15. RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .widget-page {
        padding: var(--space-md);
    }

    .hero-section {
        padding: var(--space-xl) var(--space-md);
    }

    .preview-container {
        padding: var(--space-lg);
    }

    .theme-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .mc-widget .mc-countdown {
        gap: 8px;
    }

    .mc-widget .mc-unit {
        padding: 8px 10px;
        min-width: 45px;
    }

    .mc-widget .mc-value {
        font-size: 1.25rem;
    }

    .mc-widget .mc-label {
        font-size: 0.6rem;
    }
}

@media (max-width: 500px) {
    .language-switcher {
        gap: var(--space-xs);
    }

    .lang-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }

    .code-header {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .embed-code {
        font-size: 0.75rem;
    }

    .mc-widget .mc-widget-title {
        font-size: 1rem;
    }

    .mc-widget .mc-countdown {
        flex-wrap: wrap;
    }
}
