/**
 * ============================================
 * CalenMotion Pro - Theme Styles
 * Version: 1.0.0
 * Author: CalenMotion Team
 * ============================================
 * 
 * Table of Contents:
 * 1. Theme Variables
 * 2. NeoGlass Theme
 * 3. Neumorphic Theme
 * 4. Dark Neon Theme
 * 5. Minimal Theme
 * 6. Dashboard Theme
 * 7. Glassmorphism Utilities
 * 8. Neumorphism Utilities
 * 9. Gradient Backgrounds
 * 10. Pattern Backgrounds
 */

/* ============================================
   1. Theme Variables
   ============================================ */

/* NeoGlass Theme */
[data-calendar-theme="neoglass"] {
    --cal-bg: rgba(255, 255, 255, 0.15);
    --cal-bg-solid: #ffffff;
    --cal-surface: rgba(255, 255, 255, 0.25);
    --cal-border: rgba(255, 255, 255, 0.3);
    --cal-text: #1f2937;
    --cal-text-muted: #6b7280;
    --cal-primary: #6366f1;
    --cal-primary-light: rgba(99, 102, 241, 0.15);
    --cal-accent: #8b5cf6;
    --cal-blur: 20px;
}

/* Neumorphic Theme */
[data-calendar-theme="neumorphic"] {
    --cal-bg: #e0e5ec;
    --cal-surface: #e0e5ec;
    --cal-shadow-light: #ffffff;
    --cal-shadow-dark: #a3b1c6;
    --cal-text: #4a5568;
    --cal-text-muted: #718096;
    --cal-primary: #6366f1;
    --cal-inset-shadow: inset 4px 4px 8px #a3b1c6, inset -4px -4px 8px #ffffff;
    --cal-outset-shadow: 8px 8px 16px #a3b1c6, -8px -8px 16px #ffffff;
}

/* Dark Neon Theme */
[data-calendar-theme="dark-neon"] {
    --cal-bg: #0a0a0f;
    --cal-surface: #12121a;
    --cal-border: #1e1e2e;
    --cal-text: #ffffff;
    --cal-text-muted: #6b7280;
    --cal-neon-cyan: #00f5ff;
    --cal-neon-pink: #ff00ff;
    --cal-neon-purple: #bf00ff;
    --cal-neon-green: #00ff88;
    --cal-glow-cyan: 0 0 20px rgba(0, 245, 255, 0.5);
    --cal-glow-pink: 0 0 20px rgba(255, 0, 255, 0.5);
}

/* Minimal Theme */
[data-calendar-theme="minimal"] {
    --cal-bg: #ffffff;
    --cal-surface: #fafafa;
    --cal-border: #e5e5e5;
    --cal-text: #171717;
    --cal-text-muted: #737373;
    --cal-primary: #171717;
    --cal-accent: #737373;
}

/* Dashboard Theme */
[data-calendar-theme="dashboard"] {
    --cal-bg: #1e293b;
    --cal-surface: #334155;
    --cal-border: #475569;
    --cal-text: #f8fafc;
    --cal-text-muted: #94a3b8;
    --cal-primary: #3b82f6;
    --cal-success: #22c55e;
    --cal-warning: #f59e0b;
    --cal-danger: #ef4444;
}

/* ============================================
   2. NeoGlass Theme Styles
   ============================================ */

.cm-theme-neoglass {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 400px;
    padding: 2rem;
}

.cm-neoglass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.cm-neoglass-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.25rem 1.5rem;
    border-radius: 24px 24px 0 0;
}

.cm-neoglass-day {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    transition: all 0.2s ease;
}

.cm-neoglass-day:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cm-neoglass-day.active {
    background: white;
    color: #6366f1;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

/* ============================================
   3. Neumorphic Theme Styles
   ============================================ */

.cm-theme-neumorphic {
    background: #e0e5ec;
    min-height: 400px;
    padding: 2rem;
}

.cm-neumorphic-card {
    background: #e0e5ec;
    border-radius: 24px;
    box-shadow: 12px 12px 24px #a3b1c6, -12px -12px 24px #ffffff;
}

.cm-neumorphic-inset {
    background: #e0e5ec;
    border-radius: 16px;
    box-shadow: inset 6px 6px 12px #a3b1c6, inset -6px -6px 12px #ffffff;
}

.cm-neumorphic-btn {
    background: #e0e5ec;
    border-radius: 12px;
    box-shadow: 6px 6px 12px #a3b1c6, -6px -6px 12px #ffffff;
    border: none;
    padding: 12px 24px;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cm-neumorphic-btn:hover {
    box-shadow: 4px 4px 8px #a3b1c6, -4px -4px 8px #ffffff;
}

.cm-neumorphic-btn:active,
.cm-neumorphic-btn.pressed {
    box-shadow: inset 4px 4px 8px #a3b1c6, inset -4px -4px 8px #ffffff;
}

.cm-neumorphic-day {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cm-neumorphic-day:hover {
    box-shadow: 4px 4px 8px #a3b1c6, -4px -4px 8px #ffffff;
}

.cm-neumorphic-day.active {
    background: linear-gradient(145deg, #6366f1, #7c3aed);
    color: white;
    box-shadow: 4px 4px 12px #a3b1c6, -4px -4px 12px #ffffff;
}

/* ============================================
   4. Dark Neon Theme Styles
   ============================================ */

.cm-theme-dark-neon {
    background: #0a0a0f;
    min-height: 400px;
    padding: 2rem;
}

.cm-neon-card {
    background: #12121a;
    border: 1px solid #1e1e2e;
    border-radius: 20px;
    overflow: hidden;
}

.cm-neon-glow-cyan {
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3),
                0 0 40px rgba(0, 245, 255, 0.2),
                0 0 60px rgba(0, 245, 255, 0.1);
    border-color: rgba(0, 245, 255, 0.5);
}

.cm-neon-glow-pink {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3),
                0 0 40px rgba(255, 0, 255, 0.2),
                0 0 60px rgba(255, 0, 255, 0.1);
    border-color: rgba(255, 0, 255, 0.5);
}

.cm-neon-text-cyan {
    color: #00f5ff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.8);
}

.cm-neon-text-pink {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
}

.cm-neon-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.cm-neon-day:hover {
    color: #00f5ff;
    background: rgba(0, 245, 255, 0.1);
}

.cm-neon-day.active {
    color: #0a0a0f;
    background: linear-gradient(135deg, #00f5ff, #bf00ff);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.cm-neon-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f5ff, #bf00ff, transparent);
    animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   5. Minimal Theme Styles
   ============================================ */

.cm-theme-minimal {
    background: #ffffff;
    min-height: 400px;
    padding: 2rem;
}

.cm-minimal-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.cm-minimal-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #171717;
    font-weight: 400;
    transition: all 0.15s ease;
}

.cm-minimal-day:hover {
    background: #f5f5f5;
}

.cm-minimal-day.active {
    background: #171717;
    color: white;
}

.cm-minimal-day.today {
    border: 2px solid #171717;
}

/* ============================================
   6. Dashboard Theme Styles
   ============================================ */

.cm-theme-dashboard {
    background: #0f172a;
    min-height: 400px;
    padding: 2rem;
}

.cm-dashboard-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    overflow: hidden;
}

.cm-dashboard-header {
    background: #334155;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cm-dashboard-stat {
    background: #334155;
    border-radius: 12px;
    padding: 1rem;
}

.cm-dashboard-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
}

.cm-dashboard-stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cm-dashboard-day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.cm-dashboard-day:hover {
    background: #334155;
    color: #f8fafc;
}

.cm-dashboard-day.active {
    background: #3b82f6;
    color: white;
}

.cm-dashboard-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: #22c55e;
    border-radius: 50%;
}

/* ============================================
   7. Glassmorphism Utilities
   ============================================ */

.cm-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cm-glass-light {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cm-glass-dark {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cm-glass-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.cm-glass-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.cm-glass-blur-lg { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.cm-glass-blur-xl { backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); }

/* ============================================
   8. Neumorphism Utilities
   ============================================ */

.cm-neu-flat {
    background: #e0e5ec;
    box-shadow: 6px 6px 12px #a3b1c6, -6px -6px 12px #ffffff;
}

.cm-neu-pressed {
    background: #e0e5ec;
    box-shadow: inset 4px 4px 8px #a3b1c6, inset -4px -4px 8px #ffffff;
}

.cm-neu-concave {
    background: linear-gradient(145deg, #cacfd6, #f0f5fc);
    box-shadow: 6px 6px 12px #a3b1c6, -6px -6px 12px #ffffff;
}

.cm-neu-convex {
    background: linear-gradient(145deg, #f0f5fc, #cacfd6);
    box-shadow: 6px 6px 12px #a3b1c6, -6px -6px 12px #ffffff;
}

/* Dark Neumorphism */
.cm-neu-dark-flat {
    background: #2d2d3a;
    box-shadow: 6px 6px 12px #1a1a24, -6px -6px 12px #404050;
}

.cm-neu-dark-pressed {
    background: #2d2d3a;
    box-shadow: inset 4px 4px 8px #1a1a24, inset -4px -4px 8px #404050;
}

/* ============================================
   9. Gradient Backgrounds
   ============================================ */

.cm-gradient-purple-pink {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cm-gradient-blue-cyan {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
}

.cm-gradient-orange-red {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.cm-gradient-green-teal {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.cm-gradient-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.cm-gradient-sunset {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.cm-gradient-ocean {
    background: linear-gradient(135deg, #2E3192 0%, #1BFFFF 100%);
}

.cm-gradient-aurora {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 50%, #a855f7 100%);
}

/* Animated Gradient */
.cm-gradient-animated {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mesh Gradient */
.cm-gradient-mesh {
    background-color: #ffffff;
    background-image: 
        radial-gradient(at 40% 20%, hsla(239, 84%, 67%, 0.3) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(276, 84%, 67%, 0.25) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(339, 84%, 67%, 0.2) 0px, transparent 50%),
        radial-gradient(at 80% 50%, hsla(170, 84%, 67%, 0.2) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(210, 84%, 67%, 0.2) 0px, transparent 50%);
}

/* ============================================
   10. Pattern Backgrounds
   ============================================ */

.cm-pattern-dots {
    background-image: radial-gradient(circle, currentColor 1px, transparent 1px);
    background-size: 20px 20px;
}

.cm-pattern-grid {
    background-image: 
        linear-gradient(to right, currentColor 1px, transparent 1px),
        linear-gradient(to bottom, currentColor 1px, transparent 1px);
    background-size: 24px 24px;
}

.cm-pattern-diagonal {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        currentColor 10px,
        currentColor 11px
    );
}

.cm-pattern-zigzag {
    background: 
        linear-gradient(135deg, currentColor 25%, transparent 25%) -20px 0,
        linear-gradient(225deg, currentColor 25%, transparent 25%) -20px 0,
        linear-gradient(315deg, currentColor 25%, transparent 25%),
        linear-gradient(45deg, currentColor 25%, transparent 25%);
    background-size: 40px 40px;
}

.cm-pattern-waves {
    background: 
        radial-gradient(circle at 100% 50%, transparent 20%, currentColor 21%, currentColor 34%, transparent 35%, transparent),
        radial-gradient(circle at 0% 50%, transparent 20%, currentColor 21%, currentColor 34%, transparent 35%, transparent);
    background-size: 40px 80px;
}

/* Noise Texture Overlay */
.cm-texture-noise::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}