/* SubTrackr Theme System Styles */

:root {
    /* Default theme colors (will be overridden by theme selection) */
    --theme-primary: #3b82f6;
    --theme-primaryHover: #2563eb;
    --theme-secondary: #64748b;
    --theme-success: #10b981;
    --theme-warning: #f59e0b;
    --theme-danger: #ef4444;
    --theme-background: #f9fafb;
    --theme-surface: #ffffff;
    --theme-surfaceHover: #f3f4f6;
    --theme-text: #111827;
    --theme-textSecondary: #6b7280;
    --theme-border: #e5e7eb;
}

/* Default Theme - Modern Light */
[data-theme="default"] body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #0f172a !important;
}

[data-theme="default"] .bg-white,
[data-theme="default"] header {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

[data-theme="default"] .bg-gray-50 {
    background-color: #f8fafc !important;
}

[data-theme="default"] .border-gray-200 {
    border-color: #e2e8f0 !important;
}

/* Dark Theme - Professional Dark (not pure black) */
[data-theme="dark"] body {
    background-color: #121212 !important;
    color: #E4E4E7 !important;
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] header {
    background-color: #1e1e1e !important;
}

[data-theme="dark"] .bg-gray-50 {
    background-color: #2a2a2a !important;
}

[data-theme="dark"] .text-gray-900 {
    color: #E4E4E7 !important;
}

[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700 {
    color: #a1a1aa !important;
}

[data-theme="dark"] .border-gray-200 {
    border-color: #3f3f46 !important;
}

[data-theme="dark"] .bg-primary,
[data-theme="dark"] button.bg-primary {
    background-color: #60a5fa !important;
}

[data-theme="dark"] .bg-primary:hover {
    background-color: #3b82f6 !important;
}

/* Dark Theme - Hover States */
[data-theme="dark"] .hover\:bg-gray-50:hover,
[data-theme="dark"] .hover\:bg-gray-100:hover {
    background-color: #3f3f46 !important;
}

[data-theme="dark"] .hover\:bg-white:hover {
    background-color: #2a2a2a !important;
}

/* Dark Theme - Calendar Events */
[data-theme="dark"] .bg-blue-50 {
    background-color: #1e293b !important;
}

[data-theme="dark"] .bg-blue-100 {
    background-color: #374151 !important;
}

[data-theme="dark"] .text-blue-700 {
    color: #93c5fd !important;
}

[data-theme="dark"] .hover\:bg-blue-200:hover {
    background-color: #4b5563 !important;
}

/* Christmas Theme */
[data-theme="christmas"] body {
    background: linear-gradient(135deg, #fef3f3 0%, #fef2f2 100%) !important;
    color: #1f2937 !important;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(196, 30, 58, 0.02) 10px,
            rgba(196, 30, 58, 0.02) 20px
        );
}

[data-theme="christmas"] .bg-white,
[data-theme="christmas"] header {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%) !important;
    border-color: #fecaca !important;
}

[data-theme="christmas"] .bg-primary,
[data-theme="christmas"] .bg-blue-600,
[data-theme="christmas"] button.bg-primary {
    background-color: #c41e3a !important;
}

[data-theme="christmas"] .bg-primary:hover,
[data-theme="christmas"] button.bg-primary:hover {
    background-color: #a01729 !important;
}

[data-theme="christmas"] .text-primary {
    color: #c41e3a !important;
}

/* Midnight Theme - Deep Purple Dreams */
[data-theme="midnight"] body {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0f2e 100%) !important;
    color: #e9d5ff !important;
}

[data-theme="midnight"] .bg-white,
[data-theme="midnight"] header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    border-color: #4c1d95 !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15) !important;
}

[data-theme="midnight"] .bg-gray-50 {
    background-color: #1e1e2e !important;
}

[data-theme="midnight"] .text-gray-900 {
    color: #e9d5ff !important;
}

[data-theme="midnight"] .text-gray-600,
[data-theme="midnight"] .text-gray-700 {
    color: #c4b5fd !important;
}

[data-theme="midnight"] .border-gray-200 {
    border-color: #4c1d95 !important;
}

[data-theme="midnight"] .bg-primary,
[data-theme="midnight"] button.bg-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5) !important;
}

[data-theme="midnight"] .bg-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.7) !important;
}

/* Midnight theme glow effects */
[data-theme="midnight"] h1,
[data-theme="midnight"] h2,
[data-theme="midnight"] h3 {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* Midnight Theme - Calendar Events */
[data-theme="midnight"] .bg-blue-50 {
    background-color: #1e1e2e !important;
}

[data-theme="midnight"] .bg-blue-100 {
    background-color: #2a2540 !important;
}

[data-theme="midnight"] .text-blue-700 {
    color: #c4b5fd !important;
}

[data-theme="midnight"] .hover\:bg-blue-200:hover {
    background-color: #3a3550 !important;
}

/* Ocean Theme */
[data-theme="ocean"] body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    color: #0c4a6e !important;
}

[data-theme="ocean"] .bg-white,
[data-theme="ocean"] header {
    background-color: #ffffff !important;
    border-color: #bae6fd !important;
}

[data-theme="ocean"] .text-gray-900 {
    color: #0c4a6e !important;
}

[data-theme="ocean"] .text-gray-600,
[data-theme="ocean"] .text-gray-700 {
    color: #475569 !important;
}

[data-theme="ocean"] .bg-primary,
[data-theme="ocean"] button.bg-primary {
    background-color: #0891b2 !important;
}

[data-theme="ocean"] .bg-primary:hover {
    background-color: #06b6d4 !important;
}

/* Christmas Theme - Add festive touches */
[data-theme="christmas"] .logo,
[data-theme="christmas"] img[alt="SubTrackr"] {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.3));
}

/* Christmas Theme - Festive buttons */
[data-theme="christmas"] button,
[data-theme="christmas"] .btn {
    transition: all 0.3s ease;
}

[data-theme="christmas"] button:hover,
[data-theme="christmas"] .btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2);
}

/* Christmas Theme - Add gold sparkle to primary actions */
[data-theme="christmas"] .btn-primary::after {
    content: '✨';
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="christmas"] .btn-primary:hover::after {
    opacity: 1;
}

/* Snowfall Animation */
@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}

.snowflake {
    color: #ffffff;
    text-shadow:
        0 0 5px #ffffff,
        0 0 10px #e0f2fe,
        0 0 15px #bae6fd;
}

/* Christmas Theme - Festive card decorations */
[data-theme="christmas"] .card,
[data-theme="christmas"] .bg-white {
    border-left: 3px solid var(--theme-special-accent, #ffd700);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.1),
        -3px 0 0 rgba(255, 215, 0, 0.3);
}

/* Christmas Theme - Add holly decorations to headers */
[data-theme="christmas"] h1::before,
[data-theme="christmas"] h2::before {
    content: '🎄 ';
    margin-right: 0.5rem;
}

[data-theme="christmas"] h1::after,
[data-theme="christmas"] h2::after {
    content: ' 🎄';
    margin-left: 0.5rem;
}

/* Ocean Theme - Wavy effect on hover */
[data-theme="ocean"] .card:hover,
[data-theme="ocean"] .bg-white:hover {
    box-shadow:
        0 4px 6px -1px rgba(8, 145, 178, 0.1),
        0 2px 4px -1px rgba(8, 145, 178, 0.06);
}

/* Midnight Theme - Glow effects */
[data-theme="midnight"] button:focus,
[data-theme="midnight"] .btn:focus {
    box-shadow:
        0 0 0 2px rgba(139, 92, 246, 0.3),
        0 0 12px rgba(139, 92, 246, 0.4);
}

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

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .snowflake {
        display: none;
    }
}

/* Theme selector styles */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.theme-option {
    padding: 1rem;
    border: 2px solid var(--theme-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--theme-surface);
}

.theme-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.theme-preview {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    height: 40px;
}

.theme-preview-color {
    flex: 1;
    border-radius: 0.25rem;
}

.theme-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.theme-description {
    font-size: 0.875rem;
    opacity: 0.8;
}
