/* Theme Variables */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --emerald-bg: #10b981;
    --emerald-text: #10b981;
    --blue-bg: #3b82f6;
    --blue-text: #3b82f6;
    --amber-bg: #f59e0b;
    --amber-text: #f59e0b;
    --violet-bg: #8b5cf6;
    --violet-text: #8b5cf6;
    --icon-filter: none;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --emerald-bg: #059669;
    --emerald-text: #34d399;
    --blue-bg: #2563eb;
    --blue-text: #60a5fa;
    --amber-bg: #d97706;
    --amber-text: #fbbf24;
    --violet-bg: #7c3aed;
    --violet-text: #a78bfa;
    --icon-filter: brightness(0.9);
}

/* Theme Classes */
.theme-bg-primary {
    background-color: var(--bg-primary);
}

.theme-bg-secondary {
    background-color: var(--bg-secondary);
}

.theme-bg-tertiary {
    background-color: var(--bg-tertiary);
}

.theme-text-primary {
    color: var(--text-primary);
}

.theme-text-secondary {
    color: var(--text-secondary);
}

.theme-text-tertiary {
    color: var(--text-tertiary);
}

.theme-border {
    border-color: var(--border-color);
}

.theme-shadow-sm {
    box-shadow: var(--shadow-sm);
}

.theme-shadow-md {
    box-shadow: var(--shadow-md);
}

/* Icon Filter for Dark Mode */
[data-theme="dark"] img {
    filter: var(--icon-filter);
}

/* Smooth Theme Transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Override Tailwind colors with theme variables */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .bg-gray-50 {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-gray-100 {
    background-color: var(--bg-tertiary) !important;
}

[data-theme="dark"] .text-gray-900 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-gray-500 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .border-gray-200 {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

/* Emerald color adjustments for dark mode */
[data-theme="dark"] .bg-emerald-500 {
    background-color: var(--emerald-bg) !important;
}

[data-theme="dark"] .text-emerald-500 {
    color: var(--emerald-text) !important;
}

/* Blue color adjustments for dark mode */
[data-theme="dark"] .bg-blue-500 {
    background-color: var(--blue-bg) !important;
}

[data-theme="dark"] .text-blue-500 {
    color: var(--blue-text) !important;
}

/* Amber color adjustments for dark mode */
[data-theme="dark"] .bg-amber-500 {
    background-color: var(--amber-bg) !important;
}

[data-theme="dark"] .text-amber-500 {
    color: var(--amber-text) !important;
}

/* Violet color adjustments for dark mode */
[data-theme="dark"] .bg-violet-500 {
    background-color: var(--violet-bg) !important;
}

[data-theme="dark"] .text-violet-500 {
    color: var(--violet-text) !important;
}

/* Keep white text white in dark mode */
[data-theme="dark"] .text-white {
    color: #ffffff !important;
}

/* Overlay darkness adjustment */
[data-theme="dark"] .bg-opacity-50 {
    --tw-bg-opacity: 0.7;
}
