/* Annual Vacations Calendar Styles */

/* Page Header Actions - Right-aligned controls */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Year Navigation - Matches AnnualSummaryReport style */
.year-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.department-hours-header .year-navigation {
    margin-bottom: 0;
}

.year-display {
    min-width: 120px;
    text-align: center;
}

.year-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Annual Summary Container */
.annual-summary-container {
    padding: 0;
}

/* Calendar Grid - Standard responsive layout */
.vacations-annual-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

.vacations-month-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vacations-month-header {
    text-align: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.vacations-month-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 600;
    text-transform: capitalize;
}

.vacations-weekdays {
    display: grid;
    grid-template-columns: 32px repeat(7, 1fr);  /* Fixed week number column + 7 days */
    gap: 0;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vacations-weekdays > :first-child {
    /* Empty div placeholder for week number column */
}

.vacations-weekdays span {
    padding: 0.3rem 0;
}

.vacations-days-grid {
    display: grid;
    grid-template-columns: 32px repeat(7, 1fr);  /* Fixed week number + 7 days */
    gap: 0;
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 0;
    padding: 0;
}

.week-number-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-align: center;
    font-weight: 600;
    background-color: transparent;
    border: none;
}

.week-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
    color: white;
    border-radius: 3px;
    padding: 0.15rem 0.1rem;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 1.8rem;
    min-height: 1.5rem;
}

/* Vacation Day Cell Styles */
.vacation-day-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: default;
    transition: all 0.15s ease;
    padding: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text);
    box-sizing: border-box;
    z-index: 1;
    min-height: 2.5rem;
}

.vacation-day-cell:hover {
    z-index: 1;
}

.vacation-day-empty {
    background: transparent;
    border: none;
}

/* Grid borders - apply border-top to cells in first row (week count: 7 days per row + 1 week number) */
.vacations-days-grid > :nth-child(-n + 8) {
    border-top: none;
}

/* Last row bottom borders */
.vacations-days-grid > :nth-last-child(-n + 8) {
    border-bottom: none;
}

/* First column (week numbers) left border */
.week-number-cell:first-of-type,
.vacations-days-grid > .week-number-cell {
    border-left: none;
}

/* Last column (sunday) right border */
.vacations-days-grid > :nth-child(8n) {
    border-right: none;
}

/* Cell Type Colors - Vacation (pending/validated status) */
/* Pending: circle with border, no background */
.vacation-day-vacation.vacation-day-pending {
    background: transparent;
    color: var(--md-yellow-700);
}

.vacation-day-vacation.vacation-day-pending::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1px solid var(--md-yellow-700);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vacation-day-vacation.vacation-day-pending:hover::before {
    border-color: var(--md-yellow-600);
}

.vacation-day-vacation.vacation-day-pending:hover {
    color: var(--md-yellow-600);
}

/* Validated: circle with border only, text colored */
.vacation-day-vacation.vacation-day-validated {
    background: transparent;
    color: var(--md-green-600);
}

.vacation-day-vacation.vacation-day-validated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1px solid var(--md-green-600);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vacation-day-vacation.vacation-day-validated:hover {
    color: var(--md-green-700);
}

.vacation-day-vacation.vacation-day-validated:hover::before {
    border-color: var(--md-green-700);
}

/* Cell Type Colors - Sick Leave & Leave (Permiso retribuido) */
/* Pending: circle with border, no background */
.vacation-day-sick.vacation-day-pending,
.vacation-day-leave.vacation-day-pending {
    background: transparent;
    color: var(--md-blue-600);
}

.vacation-day-sick.vacation-day-pending::before,
.vacation-day-leave.vacation-day-pending::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1px solid var(--md-blue-600);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vacation-day-sick.vacation-day-pending:hover::before,
.vacation-day-leave.vacation-day-pending:hover::before {
    border-color: var(--md-blue-700);
}

.vacation-day-sick.vacation-day-pending:hover,
.vacation-day-leave.vacation-day-pending:hover {
    color: var(--md-blue-700);
}

/* Validated: circle with border only, text colored */
.vacation-day-sick.vacation-day-validated,
.vacation-day-leave.vacation-day-validated {
    background: transparent;
    color: var(--md-blue-600);
}

.vacation-day-sick.vacation-day-validated::before,
.vacation-day-leave.vacation-day-validated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1px solid var(--md-blue-600);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vacation-day-sick.vacation-day-validated:hover,
.vacation-day-leave.vacation-day-validated:hover {
    color: var(--md-blue-700);
}

.vacation-day-sick.vacation-day-validated:hover::before,
.vacation-day-leave.vacation-day-validated:hover::before {
    border-color: var(--md-blue-700);
}

/* Cell Type Colors - Telework */
/* Pending: circle with border, no background */
.vacation-day-telework.vacation-day-pending {
    background: transparent;
    color: var(--md-tertiary-50);
}

.vacation-day-telework.vacation-day-pending::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1px solid var(--md-tertiary-50);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vacation-day-telework.vacation-day-pending:hover::before {
    border-color: var(--md-tertiary-40);
}

.vacation-day-telework.vacation-day-pending:hover {
    color: var(--md-tertiary-40);
}

/* Validated: circle with border only, text colored */
.vacation-day-telework.vacation-day-validated {
    background: transparent;
    color: var(--md-tertiary-30);
}

.vacation-day-telework.vacation-day-validated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1px solid var(--md-tertiary-30);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vacation-day-telework.vacation-day-validated:hover {
    color: var(--md-tertiary-20);
}

.vacation-day-telework.vacation-day-validated:hover::before {
    border-color: var(--md-tertiary-20);
}

/* Cell Type Colors - Holiday */
.vacation-day-holiday {
    background: transparent;
    color: var(--md-red-500);
}

.vacation-day-holiday::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1px solid var(--md-red-500);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vacation-day-holiday:hover {
    color: var(--md-red-400);
}

.vacation-day-holiday:hover::before {
    border-color: var(--md-red-400);
}

/* User Filter Group - Matches standard style */
.user-filter-group {
    margin: 0;
}

.user-filter-group label {
    margin-bottom: 0.3rem;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .vacations-annual-calendar {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .vacations-annual-calendar {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 0.75rem;
    }

    .vacations-month-card {
        padding: 0.75rem;
    }

    .vacations-month-header h3 {
        font-size: 0.95rem;
    }

    .vacations-weekdays {
        font-size: 0.65rem;
    }
}
