/* Workweek Calendar Advanced Styles */

.card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.custom-weekends {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.9rem;
}



.text-success {
    color: #10b981;
}

.text-danger {
    color: #ef4444;
}

.text-muted {
    color: #9ca3af;
}

.stat-card.highlight .stat-value {
    color: var(--primary);
}

.advanced-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
}

@media (max-width: 768px) {
    .advanced-grid {
        grid-template-columns: 1fr;
    }
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.feature-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.long-weekends-list,
.leave-suggestions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

details > summary {
    list-style: none;
}
details > summary::-webkit-details-marker {
    display: none;
}
details[open] .dropdown-arrow {
    transform: rotate(90deg);
}

.lw-card,
.leave-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lw-dates,
.leave-dates {
    font-weight: 600;
    color: var(--text-color);
}

.lw-info,
.leave-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.lw-duration,
.leave-duration {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
}

.placeholder-text {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.bg-success {
    background-color: #10b981;
}

.bg-muted {
    background-color: #9ca3af;
}

.bg-danger {
    background-color: #ef4444;
}

.bg-warning {
    background-color: #eab308;
}


/* New Week Widget Styles */
.week-widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.light .week-widget {
    background: #fff;
}

.week-widget-header {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    padding: 0.75rem;
}

.week-widget-body {
    padding: 2rem;
    text-align: center;
}

.week-number-display {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: #333;
    margin-bottom: 1rem;
}

.week-date-range {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Stacked Calendar Styles */
.month-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
}

.month-header-bar {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Updated 8 columns (Week Number + 7 Days) */
.days-grid-8 {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    text-align: center;
    font-size: 0.85rem;
    background: var(--bg-surface);
}

.day-name,
.week-col-name {
    padding: 0.5rem 0;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.week-col-name {
    font-size: 0.85rem;
    font-weight: 600;
    font-style: normal;
    background: rgba(0, 0, 0, 0.02);
}

.day-cell {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.week-num-cell {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    border-right: 2px solid #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ongoing-week {
    border-top: 2px solid #1e3a8a !important;
    border-bottom: 2px solid #1e3a8a !important;
    border-radius: 0 !important;
    box-sizing: border-box;
}

.week-num-cell.ongoing-week {
    color: #1e3a8a;
    border-left: 2px solid #1e3a8a !important;
    border-right: none !important;
}

.day-cell.ongoing-week:nth-child(8n) {
    border-right: 2px solid #1e3a8a !important;
}

.day-cell:nth-child(8n) {
    border-right: none;
}

.day-cell.empty {
    background: transparent;
}

.day-cell.working {
    color: var(--text-color);
}

.day-cell.weekend {
    color: #f87171;
    font-weight: 500;
}

.day-cell.holiday {
    background-color: #ef4444;
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

.day-cell.long-weekend {
    background-color: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
    font-weight: bold;
    border-radius: 4px;
}

.day-cell.long-weekend.holiday {
    color: #ef4444;
}

.day-cell.today {
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

.month-holidays-list {
    padding: 1rem;
    background: var(--bg-color);
}

.month-holiday-item {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.month-holiday-date {
    color: #ef4444;
    font-weight: bold;
    min-width: 60px;
}

.month-holiday-name {
    color: var(--text-color);
}

.calc-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.calc-inputs .input-group {
    min-width: 0;
}

.calc-inputs .form-control {
    min-width: 0;
}

.calc-inputs label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.calc-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.result-row.highlight {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}

@media print {
    body * {
        visibility: hidden;
    }

    #yearlyCalendarStack,
    #yearlyCalendarStack * {
        visibility: visible;
    }

    #yearlyCalendarStack {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}
}
}

position: absolute;
left: 0;
top: 0;
width: 100%;
}
}
}
}