/* ===================================================================
   Feiertage-Modul CSS
   Feature #14: Feiertage-Verwaltungssystem
   =================================================================== */

/* Feiertags-Badge (normal size) */
.feiertag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.3);
    white-space: nowrap;
}

/* Halber Feiertag (z.B. Heiligabend) */
.feiertag-badge.feiertag-halb {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
}

/* Feiertags-Badge (small, für Header) */
.feiertag-badge-small {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 8px;
    margin-left: 6px;
    white-space: nowrap;
}

.feiertag-badge-small.feiertag-halb {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Day header with holiday */
.day-header.feiertag {
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.1), transparent);
    border-top: 3px solid #dc2626;
}

/* Shift cell on holiday */
.shift-cell.feiertag {
    background: linear-gradient(to right,
        rgba(220, 38, 38, 0.08),
        rgba(185, 28, 28, 0.05)
    );
    border-left: 3px solid #dc2626;
}

.shift-cell.feiertag:hover {
    background: linear-gradient(to right,
        rgba(220, 38, 38, 0.12),
        rgba(185, 28, 28, 0.08)
    );
}

/* Feiertags-Warnung in Mitarbeiter-Auswahl */
.feiertag-warnung {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 10px 0;
}

.feiertag-warnung-icon {
    flex-shrink: 0;
    font-size: 1.2em;
}

.feiertag-warnung-text {
    flex: 1;
    font-size: 0.9em;
    color: #92400e;
}

.feiertag-warnung-text strong {
    display: block;
    margin-bottom: 4px;
    color: #78350f;
}

/* Feiertags-Statistik */
.feiertag-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 0.85em;
    color: var(--text-muted);
}

.feiertag-stat-label {
    font-weight: 500;
}

.feiertag-stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Mitarbeiter-Auswahl: Feiertags-Status */
.mitarbeiter-feiertag-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    margin-top: 4px;
}

.mitarbeiter-feiertag-status.nicht-verfuegbar {
    color: var(--danger-color);
}

.mitarbeiter-feiertag-status.bevorzugt-nicht {
    color: var(--warning-color);
}

/* Feiertage-Verwaltung Tabelle */
.feiertage-table {
    width: 100%;
    border-collapse: collapse;
}

.feiertage-table th,
.feiertage-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.feiertage-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.feiertage-table tr:hover {
    background: var(--bg-hover);
}

/* Import-Vorschau */
.import-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.import-preview-item:last-child {
    border-bottom: none;
}

.import-preview-item.bereits-vorhanden {
    opacity: 0.5;
}

.import-preview-item input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

/* Day-Item in Navigation mit Feiertag */
.day-item.feiertag {
    position: relative;
    border-top: 3px solid #dc2626 !important;
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.05)) !important;
    color: #1f2937 !important; /* Schwarze Schrift */
}

.day-item.feiertag.active {
    border-top: 3px solid #dc2626 !important;
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.25), rgba(59, 130, 246, 0.9)) !important;
    color: white !important; /* Weiße Schrift bei aktivem Button */
}

/* Feiertag-Badge (dauerhaft sichtbar) */
.day-item.feiertag::after {
    content: attr(data-feiertag);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #dc2626;
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    margin-bottom: 4px;
}

/* ===================================================================
   Quick-Create Modal: Wochentag-Labels mit Datum
   =================================================================== */

/* Wochentag-Label Container (zweizeilig) */
.quick-wochentag-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    min-width: 54px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.quick-wochentag-label:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.quick-wochentag-label:has(input:checked) {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.quick-wochentag-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quick-wochentag-label .wochentag-datum {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
    margin-bottom: 2px;
}

.quick-wochentag-label .wochentag-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
}

/* Feiertag-Styling */
.quick-wochentag-label.quick-wochentag-feiertag {
    border-top: 3px solid #dc2626;
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.08), var(--bg-color));
}

.quick-wochentag-label.quick-wochentag-feiertag:hover {
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.12), var(--bg-secondary));
}

.quick-wochentag-label.quick-wochentag-feiertag:has(input:checked) {
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.15), rgba(37, 99, 235, 0.1));
    border-color: var(--primary-color);
    border-top-color: #dc2626;
}

.quick-wochentag-label.quick-wochentag-feiertag .wochentag-datum {
    color: #dc2626;
    font-weight: 500;
}

/* Dark Mode Support */
[data-theme="dunkel"] .quick-wochentag-label.quick-wochentag-feiertag {
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.15), var(--bg-color));
}

[data-theme="dunkel"] .quick-wochentag-label.quick-wochentag-feiertag .wochentag-datum {
    color: #f87171;
}

/* Responsive */
@media (max-width: 768px) {
    .feiertag-badge {
        font-size: 0.75em;
        padding: 3px 6px;
    }

    .feiertag-badge-small {
        font-size: 0.65em;
        padding: 2px 4px;
    }

    .quick-wochentag-label {
        min-width: 46px;
        padding: 6px 8px;
    }

    .quick-wochentag-label .wochentag-datum {
        font-size: 10px;
    }

    .quick-wochentag-label .wochentag-name {
        font-size: 13px;
    }
}

