/* ============================================
   Friday — Personal Absence Tracker
   Modern, light/dark with glass touches
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&display=swap');

/* ---- Dot grid background ---- */
body {
    background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}
html.dark body {
    background-image: radial-gradient(circle, rgba(130,160,220,0.04) 1px, transparent 1px);
}

/* ---- Animations ---- */
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-rise { animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.delay-1 { animation-delay: 0.06s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }

/* ---- Glass card ---- */
.glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
html.dark .glass {
    background: rgba(130, 160, 220, 0.06);
    border-color: rgba(130, 160, 220, 0.1);
}

/* ---- Calendar day interaction ---- */
.cal-day {
    transition: background 0.15s, color 0.15s, transform 0.15s, opacity 0.3s;
    cursor: default;
}
.cal-day.interactive { cursor: pointer; }
.range-selecting .cal-day.interactive:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: scale(1.12);
}

/* Calendar day fade: muted by default, active when in-month */
.cal-fade { opacity: 0.25; }
.cal-fade.in-month { opacity: 1; }
.cal-fade.in-month.is-weekend { opacity: 0.7; color: #6b7280; }
html.dark .cal-fade.in-month.is-weekend { color: #64748b; }

/* Weekend column tint */
.is-weekend { background: rgba(99, 102, 241, 0.04); }
html.dark .is-weekend { background: rgba(130, 160, 220, 0.10); }

/* Split day: two half-day types */
.cal-split {
    --color-vacation: rgba(16, 185, 129, 0.18);
    --color-sick: rgba(239, 68, 68, 0.18);
    --color-homeoffice: rgba(245, 158, 11, 0.18);
    --color-halfday: rgba(6, 182, 212, 0.18);
    --color-companyholiday: rgba(244, 114, 182, 0.18);
    color: #4b5563;
}
html.dark .cal-split {
    --color-vacation: rgba(16, 185, 129, 0.30);
    --color-sick: rgba(239, 68, 68, 0.30);
    --color-homeoffice: rgba(245, 158, 11, 0.30);
    --color-halfday: rgba(6, 182, 212, 0.30);
    --color-companyholiday: rgba(244, 114, 182, 0.30);
    color: #cbd5e1;
}


/* Half-day: diagonal stripe overlay */
.cal-half::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(255,255,255,0.55) 3px,
        rgba(255,255,255,0.55) 6px
    );
    border-radius: inherit;
    pointer-events: none;
}
html.dark .cal-half::after {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.35) 3px,
        rgba(0,0,0,0.35) 6px
    );
}

/* ---- Schulferien indicator ---- */
.cal-schulferien {
    background-color: rgba(167, 139, 250, 0.08);
}
html.dark .cal-schulferien {
    background-color: rgba(167, 139, 250, 0.15);
}

/* ---- Range selection preview ---- */
.cal-day.range-start {
    background: rgba(99, 102, 241, 0.2) !important;
    box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.5);
    border-radius: 8px;
    transform: scale(1.08);
}
html.dark .cal-day.range-start {
    background: rgba(99, 102, 241, 0.3) !important;
    box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.6);
}
.cal-day.range-preview {
    background: rgba(99, 102, 241, 0.10) !important;
    border-radius: 0;
}
.cal-day.range-preview.range-end {
    border-radius: 0 8px 8px 0;
}
.cal-day.range-start.range-has-end {
    border-radius: 8px 0 0 8px;
}
html.dark .cal-day.range-preview {
    background: rgba(99, 102, 241, 0.18) !important;
}
.cal-day.range-skip {
    opacity: 0.35 !important;
}

/* ---- Category card hover ---- */
.cat-card {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
html.dark .cat-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ---- Stat divider ---- */
.stat-divider {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.08), transparent);
}
html.dark .stat-divider {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* ---- Theme toggle button ---- */
.theme-toggle {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}
.theme-toggle:hover {
    transform: scale(1.15);
}
