/* ============================================================
   PREMIUM CUSTOM CALENDAR (Glassmorphism & iOS Modern Style)
   ============================================================ */
:root {
    --cal-bg: var(--bg-surface);
    --cal-border: var(--border-subtle);
    --cal-header-bg: var(--bg-elevated);
    --cal-today-bg: rgba(8, 104, 163, 0.08);
    --cal-today-border: rgba(8, 104, 163, 0.35);
    --cal-selected-bg: linear-gradient(135deg, var(--remind-blue) 0%, #0d9488 100%);
    --cal-selected-text: #fff;
    --cal-event-dot: var(--remind-blue);
    --cal-muted: var(--text-muted);
    --cal-hover-bg: rgba(8, 104, 163, 0.06);
}

body.dark-mode {
    --cal-bg: var(--bg-surface);
    --cal-border: var(--border-subtle);
    --cal-header-bg: var(--bg-elevated);
    --cal-today-bg: rgba(255, 255, 255, 0.06);
    --cal-today-border: rgba(255, 255, 255, 0.2);
    --cal-selected-bg: linear-gradient(135deg, var(--remind-blue) 0%, #0d9488 100%);
    --cal-selected-text: #fff;
    --cal-event-dot: var(--remind-blue);
    --cal-muted: var(--text-muted);
    --cal-hover-bg: rgba(255, 255, 255, 0.05);
}

.remind-calendar-container {
    background: var(--cal-bg);
    border-radius: 24px;
    border: 1px solid var(--cal-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-bottom: 25px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    animation: fadeSlideIn 0.4s ease;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    min-height: fit-content;
}

.remind-calendar-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border-color: rgba(8, 104, 163, 0.15);
}

.remind-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(to bottom, var(--cal-header-bg), var(--cal-bg));
    border-bottom: 1px solid var(--cal-border);
}

.remind-calendar-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.remind-calendar-title i {
    font-size: 18px;
    background: linear-gradient(135deg, var(--remind-blue) 0%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.remind-calendar-nav {
    display: flex;
    gap: 8px;
}

.cal-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--cal-border);
    background: var(--bg-surface);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.cal-nav-btn:hover {
    background: linear-gradient(135deg, var(--remind-blue) 0%, #0db1a2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(8, 104, 163, 0.25);
    transform: translateY(-2px) scale(1.05);
}

.cal-nav-btn:active {
    transform: scale(0.95) translateY(0);
}

#cal-today {
    width: auto;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 20px;
}

.remind-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 15px;
    gap: 4px;
}

.cal-day-label {
    text-align: center;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--cal-muted);
    padding: 10px 0;
    text-transform: uppercase;
    opacity: 0.85;
}

.cal-day-cell {
    aspect-ratio: 1 / 1;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    margin: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cal-day-cell:hover {
    background: var(--cal-hover-bg);
    transform: scale(1.08) translateY(-1px);
}

.cal-day-number {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    z-index: 2;
    transition: color 0.3s ease;
}

.cal-day-cell.other-month .cal-day-number {
    color: var(--cal-muted);
    opacity: 0.25;
}

.cal-day-cell.today {
    background: var(--cal-today-bg);
    border: 1.5px solid var(--cal-today-border);
}

.cal-day-cell.selected {
    background: var(--cal-selected-bg) !important;
    box-shadow: 0 8px 22px rgba(8, 104, 163, 0.35) !important;
    transform: scale(1.08);
}

.cal-day-cell.selected .cal-day-number {
    color: var(--cal-selected-text);
}

.cal-event-indicators {
    display: flex;
    gap: 3px;
    margin-top: 5px;
    height: 5px;
    justify-content: center;
}

.cal-event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cal-event-dot);
    box-shadow: 0 0 2px rgba(8, 104, 163, 0.3);
    transition: background 0.3s ease;
}

.cal-day-cell.selected .cal-event-dot {
    background: white;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 600px) {
    .remind-calendar-title {
        font-size: 16px;
    }
    .cal-day-number {
        font-size: 13px;
    }
    .cal-day-cell {
        border-radius: 12px;
    }
}

/* Simple view switcher */
.cal-view-switcher {
    display: flex;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--cal-border);
}

.cal-view-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.cal-view-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
