
/* Duniya Al-Kuwait — Day/Night Mode v1 */

:root {
    color-scheme: dark;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg-color: #f8f4eb;
    --text-light: #29251f;
    --text-muted: #696154;
    --text-gold: #86651e;
    --gold-gradient: linear-gradient(
        135deg, #a67c26, #74520e, #c49b43
    );
}

html, body {
    transition: background-color .3s ease, color .3s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.theme-switcher {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(212,175,55,.4);
    border-radius: 50%;
    background: rgba(212,175,55,.08);
    color: var(--text-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    transition: transform .2s, background .2s;
}

.theme-toggle:hover {
    transform: scale(1.08);
    background: rgba(212,175,55,.18);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--text-gold);
    outline-offset: 3px;
}

.theme-label {
    font-size: .58rem;
    color: var(--text-muted);
    letter-spacing: .04em;
}

:root[data-theme="light"] .price-card,
:root[data-theme="light"] .budget-calculator {
    background: linear-gradient(145deg,#fffdf8,#f1e8d6);
    border-color: rgba(134,101,30,.3);
}

:root[data-theme="light"] .price-card.silver {
    background: linear-gradient(145deg,#ffffff,#ebe9e5);
}

:root[data-theme="light"] .history {
    background: rgba(255,255,255,.55);
    border-color: rgba(134,101,30,.3);
}

:root[data-theme="light"] .history select,
:root[data-theme="light"] .calculator-fields input,
:root[data-theme="light"] .calculator-fields select {
    background: #fffdf8;
    color: #29251f;
    border-color: #bba579;
}

:root[data-theme="light"] .history-controls button {
    color: #625744;
    border-color: #bba579;
}

:root[data-theme="light"] .history-controls button[aria-pressed="true"] {
    background: #86651e;
    color: #ffffff;
}

:root[data-theme="light"] .calculator-mode-button {
    background: #fffaf0;
    color: #29251f;
}

:root[data-theme="light"] .calculator-mode-option input:checked
+ .calculator-mode-button {
    background: linear-gradient(145deg,#e8c46c,#c99b39);
    color: #211b11;
}

:root[data-theme="light"] .calculator-mode-option input:focus-visible
+ .calculator-mode-button {
    outline-color: #86651e;
}

:root[data-theme="light"] .calculator-result,
:root[data-theme="light"] .refresh-timer {
    background: rgba(191,151,67,.1);
}

:root[data-theme="light"] .price-card .price-kg,
:root[data-theme="light"] .boutique-identity-en {
    color: #86651e;
}

:root[data-theme="light"] .price-card .price-usd,
:root[data-theme="light"] .price-card .price-change-24,
:root[data-theme="light"] .visitor-counter,
:root[data-theme="light"] .market-heading .boutique-identity-ar {
    color: #696154;
}

:root[data-theme="light"] .boutique-identity-dot {
    color: #86651e;
}

:root[data-theme="light"] .price-change.up,
:root[data-theme="light"] .price-direction-arrow[data-direction="up"] {
    color: #167344;
}

:root[data-theme="light"] .price-change.down,
:root[data-theme="light"] .price-direction-arrow[data-direction="down"] {
    color: #b42335;
}

:root[data-theme="light"] .instagram-btn {
    background: rgba(134,101,30,.06);
}

:root[data-theme="light"] .instagram-btn:hover {
    color: #86651e;
}

:root[data-theme="light"] .logo-img {
    filter: drop-shadow(0 4px 12px rgba(70,50,20,.16));
}

@media (max-width:480px) {
    .header-actions {gap:12px;}
    .theme-toggle {width:34px;height:34px;}
    .theme-label {font-size:.52rem;}
}

@media (prefers-reduced-motion:reduce) {
    html,body,.theme-toggle {transition:none;}
}


/* Budget calculator bilingual alignment */
.budget-calculator .calculator-intro {
    text-align: left;
}

.budget-calculator .calculator-intro span[lang="ar"],
.budget-calculator .calculator-intro [dir="rtl"],
.budget-calculator .calculator-disclaimer [lang="ar"] {
    display: block;
    direction: rtl;
    text-align: right;
}

.budget-calculator .calculator-disclaimer [lang="en"] {
    direction: ltr;
    text-align: left;
}
