/**
 * Dark Mode CSS Variables and Styles
 */

/* Dark Mode Variables */
:root[data-theme="dark"] {
    /* Dark Mode Colors */
    --color-primary: #D4AB5F;
    --color-secondary: #9CA3AF;
    --color-accent: #38BFC0;
    --color-dark: #1F2937;
    --color-light: #fff;
    --color-bg: #111827;
    --color-text: #F9FAFB;
    --color-text-light: #D1D5DB;
}

/* Dark Mode Styles */
body[data-theme="dark"] {
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* Header Dark Mode */
body[data-theme="dark"] #masthead {
    background-color: #1F2937;
    border-bottom: 1px solid #374151;
}

/* Cards Dark Mode */
body[data-theme="dark"] .card {
    background-color: #1F2937;
    border: 1px solid #374151;
}

/* Inputs Dark Mode */
body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select {
    background-color: #374151;
    border-color: #4B5563;
    color: #F9FAFB;
}

body[data-theme="dark"] input:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] select:focus {
    border-color: var(--color-primary);
    background-color: #4B5563;
}

/* Section Backgrounds Dark Mode */
body[data-theme="dark"] .bg-gray-50 {
    background-color: #0F1419 !important;
}

body[data-theme="dark"] .bg-white {
    background-color: #1F2937 !important;
}

body[data-theme="dark"] .bg-gradient-to-br {
    background: linear-gradient(to bottom right, #1F2937, #111827) !important;
}

/* Text Colors Dark Mode */
body[data-theme="dark"] .text-gray-600,
body[data-theme="dark"] .text-gray-700 {
    color: #D1D5DB !important;
}

body[data-theme="dark"] .text-dark {
    color: #F9FAFB !important;
}

/* Border Colors Dark Mode */
body[data-theme="dark"] .border-gray-200 {
    border-color: #374151 !important;
}

/* Footer Dark Mode (it's already dark, but adjust slightly) */
body[data-theme="dark"] #colophon {
    background-color: #0F1419;
}

/* Theme Switcher Button Styles */
.theme-switcher {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: #e5e7eb;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

body[data-theme="dark"] .theme-switcher {
    background-color: #374151;
}

.theme-switcher-toggle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .theme-switcher-toggle {
    /* transform: translateX(30px); */
    background-color: #374151;
}

.theme-switcher-icon {
    width: 14px;
    height: 14px;
}

/* Sun icon (light mode) */
.icon-sun {
    color: #F59E0B;
}

/* Moon icon (dark mode) */
.icon-moon {
    color: #60A5FA;
    display: none;
}

body[data-theme="dark"] .icon-sun {
    display: none;
}

body[data-theme="dark"] .icon-moon {
    display: block;
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Exclude specific elements from transition */
.no-theme-transition,
.no-theme-transition * {
    transition: none !important;
}