/* ========================================
   Alternatywne schematy kolorów
   Parafia pw. św. Wojciecha w Puchałach
   ======================================== */

/* ----------------------------------------
   MOTYW 1: Klasyczny bordowy (domyślny)
   ---------------------------------------- */
[data-theme="classic"] {
    --color-primary: #8B0000;
    --color-primary-dark: #5c0000;
    --color-primary-light: #a52a2a;
    --color-secondary: #D4AF37;
    --color-secondary-light: #e6c65a;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #888888;
    --color-bg: #ffffff;
    --color-bg-light: #f8f6f3;
    --color-bg-alt: #f0ebe3;
    --color-border: #e0d8cc;
    --color-border-light: #ebe6dc;
}

/* ----------------------------------------
   MOTYW 2: Niebieski (maryjny)
   ---------------------------------------- */
[data-theme="blue"] {
    --color-primary: #1a4480;
    --color-primary-dark: #0d2240;
    --color-primary-light: #2e6cb5;
    --color-secondary: #c9a227;
    --color-secondary-light: #ddb93d;
    --color-text: #2d3748;
    --color-text-light: #4a5568;
    --color-text-muted: #718096;
    --color-bg: #ffffff;
    --color-bg-light: #f7fafc;
    --color-bg-alt: #edf2f7;
    --color-border: #e2e8f0;
    --color-border-light: #edf2f7;
}

/* ----------------------------------------
   MOTYW 3: Zielony (liturgiczny)
   ---------------------------------------- */
[data-theme="green"] {
    --color-primary: #1e5631;
    --color-primary-dark: #0f3a1d;
    --color-primary-light: #2d7a47;
    --color-secondary: #b8860b;
    --color-secondary-light: #d4a017;
    --color-text: #2d3e2d;
    --color-text-light: #4a5d4a;
    --color-text-muted: #6b7d6b;
    --color-bg: #ffffff;
    --color-bg-light: #f5f9f5;
    --color-bg-alt: #e8f0e8;
    --color-border: #d4e4d4;
    --color-border-light: #e8f0e8;
}

/* ----------------------------------------
   MOTYW 4: Fioletowy (adwentowy)
   ---------------------------------------- */
[data-theme="purple"] {
    --color-primary: #4a235a;
    --color-primary-dark: #2e1438;
    --color-primary-light: #6c3483;
    --color-secondary: #c9a227;
    --color-secondary-light: #ddb93d;
    --color-text: #2d2d3a;
    --color-text-light: #4a4a5a;
    --color-text-muted: #6b6b7d;
    --color-bg: #ffffff;
    --color-bg-light: #faf8fc;
    --color-bg-alt: #f3eef6;
    --color-border: #e6dce8;
    --color-border-light: #f3eef6;
}

/* ----------------------------------------
   MOTYW 5: Brązowy (franciszkański)
   ---------------------------------------- */
[data-theme="brown"] {
    --color-primary: #5d4037;
    --color-primary-dark: #3e2723;
    --color-primary-light: #795548;
    --color-secondary: #c9a227;
    --color-secondary-light: #ddb93d;
    --color-text: #3e2723;
    --color-text-light: #5d4037;
    --color-text-muted: #8d6e63;
    --color-bg: #ffffff;
    --color-bg-light: #faf8f6;
    --color-bg-alt: #efebe9;
    --color-border: #d7ccc8;
    --color-border-light: #efebe9;
}

/* ----------------------------------------
   TRYB CIEMNY (Dark Mode)
   ---------------------------------------- */
[data-theme="dark"] {
    --color-primary: #c9a227;
    --color-primary-dark: #a8850d;
    --color-primary-light: #ddb93d;
    --color-secondary: #c9a227;
    --color-secondary-light: #ddb93d;
    --color-text: #e8e6e3;
    --color-text-light: #b8b5b0;
    --color-text-muted: #8a8680;
    --color-bg: #1a1a1a;
    --color-bg-light: #252525;
    --color-bg-alt: #2d2d2d;
    --color-border: #404040;
    --color-border-light: #353535;
}

/* Poprawki dla trybu ciemnego */
[data-theme="dark"] .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border-bottom-color: var(--color-border);
}

[data-theme="dark"] .header-top {
    background-color: #0d0d0d;
}

[data-theme="dark"] .main-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

[data-theme="dark"] .page-hero,
[data-theme="dark"] .page-hero-small {
    background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%);
}

[data-theme="dark"] .sidebar-card {
    background-color: var(--color-bg-light);
    border-color: var(--color-border);
}

[data-theme="dark"] .sidebar-card.highlight {
    background: linear-gradient(135deg, #2d2520 0%, #252525 100%);
    border-color: var(--color-primary);
}

[data-theme="dark"] img {
    opacity: 0.9;
}

[data-theme="dark"] .btn-primary {
    background-color: var(--color-primary);
    color: #1a1a1a;
}

[data-theme="dark"] .btn-primary:hover {
    background-color: var(--color-primary-light);
}

[data-theme="dark"] .dropdown {
    background-color: var(--color-bg-light);
    border-color: var(--color-border);
}

[data-theme="dark"] .nav-menu a {
    color: var(--color-text);
}

[data-theme="dark"] .announcement-block.current {
    background-color: var(--color-bg-light);
    border-color: var(--color-border);
}

[data-theme="dark"] .archive-item {
    border-color: var(--color-border);
}

/* ----------------------------------------
   PRZEŁĄCZNIK MOTYWÓW
   ---------------------------------------- */
.theme-switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.theme-switcher:hover,
.theme-switcher.expanded {
    max-height: 400px;
    padding: 16px;
}

.theme-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.theme-switcher-toggle::before {
    content: "\1F3A8"; /* Paleta emoji */
    font-size: 1.2rem;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-switcher:hover .theme-options,
.theme-switcher.expanded .theme-options {
    opacity: 1;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-bg);
    font-size: 0.85rem;
}

.theme-option:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
}

.theme-option.active {
    border-color: var(--color-primary);
    background: var(--color-bg-alt);
}

.theme-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.theme-option[data-theme="classic"] .theme-color-preview { background: #8B0000; }
.theme-option[data-theme="blue"] .theme-color-preview { background: #1a4480; }
.theme-option[data-theme="green"] .theme-color-preview { background: #1e5631; }
.theme-option[data-theme="purple"] .theme-color-preview { background: #4a235a; }
.theme-option[data-theme="brown"] .theme-color-preview { background: #5d4037; }
.theme-option[data-theme="dark"] .theme-color-preview {
    background: linear-gradient(135deg, #1a1a1a 50%, #c9a227 50%);
}

/* Ukryj przełącznik na wydruku */
@media print {
    .theme-switcher {
        display: none;
    }
}

/* Mobilne style dla przełącznika */
@media (max-width: 768px) {
    .theme-switcher {
        bottom: 10px;
        right: 10px;
        padding: 10px;
    }

    .theme-option {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}
