/* ========================================================
   Tentative Causelist - Fancy Calendar Styles
   Peshawar High Court, Abbottabad Bench
   ======================================================== */

.tentative-calendar-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.tentative-calendar-header {
    background: linear-gradient(135deg, #1b365d, #0b1f3a);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tentative-nav-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
}

.calendar-month-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1b365d;
    margin: 0;
    display: inline-flex;
    align-items: center;
}

/* Calendar Grid */
.calendar-grid-container {
    padding: 1rem 1.25rem 1.5rem 1.25rem;
    background: #ffffff;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    padding: 8px 4px;
    background: #f1f5f9;
    border-radius: 6px;
}

.calendar-weekday.weekend {
    color: #dc2626;
    background: #fee2e2;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day-cell {
    min-height: 85px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    user-select: none;
}

.calendar-day-cell:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
    z-index: 2;
}

.calendar-day-cell.other-month {
    background: #f8fafc;
    border-color: #f1f5f9;
    opacity: 0.45;
    cursor: default;
}

.calendar-day-cell.other-month:hover {
    transform: none;
    box-shadow: none;
    border-color: #f1f5f9;
}

.calendar-day-cell.today {
    border: 2px solid #3b82f6;
    background: #f0f7ff;
}

.calendar-day-cell.has-cases {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #86efac;
}

.calendar-day-cell.has-cases:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.calendar-day-cell.selected-date {
    border: 2px solid #1b365d !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.25), 0 6px 16px rgba(0, 0, 0, 0.12) !important;
    transform: scale(1.02);
    z-index: 3;
}

.day-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.today-tag {
    font-size: 0.65rem;
    background: #3b82f6;
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
}

.day-cases-badge {
    margin-top: 4px;
    text-align: center;
}

.case-count-pill {
    display: inline-block;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25);
    white-space: nowrap;
    transition: transform 0.15s ease;
}

.calendar-day-cell:hover .case-count-pill {
    transform: scale(1.08);
}

/* Legend */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 0.82rem;
    color: #475569;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.legend-dot.cases {
    background: #16a34a;
}

.legend-dot.today {
    background: #3b82f6;
}

.legend-dot.selected {
    background: #1b365d;
}

/* Cases Output Box */
.tentative-cases-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tentative-cases-header {
    background: linear-gradient(135deg, #1b365d, #0b1f3a);
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .calendar-day-cell {
        min-height: 60px;
        padding: 3px;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .case-count-pill {
        font-size: 0.65rem;
        padding: 2px 4px;
    }

    .today-tag {
        display: none;
    }

    .calendar-month-title {
        font-size: 1.1rem;
    }
}