/* Custom overrides and utility classes for Zeiterfassung (Tailwind) */

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Material Symbols alignment */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Row states for entries table */
tr.day-row.dirty td {
    background-color: #fef3c7 !important; /* Amber-100 for dirty (unsaved) inputs */
}
tr.day-row.selected td {
    background-color: #e0e7ff !important; /* Indigo-100 for selected bulk rows */
}
tr.day-row.row-error td {
    background-color: #fee2e2 !important; /* Red-100 for validation errors */
}

/* Netto-Zelle nach Live-Neuberechnung: Vorschau-Zustand bis zum Speichern */
td.net-cell.net-preview {
    color: #b45309; /* Amber-700, passend zur Dirty-Markierung */
    font-variant-numeric: tabular-nums;
}

/* Datums- & Zeitfelder: Das Tailwind-Forms-Plugin setzt appearance:none, wodurch
   v. a. Safari nur noch ein Textfeld ohne Auswahl zeigt. Native Eingabe (mit
   Browser-Validierung) wiederherstellen; die Auswahl übernimmt der .picker-btn. */
input[type="date"],
input[type="time"] {
    -webkit-appearance: auto;
    appearance: auto;
}
.picker-wrap input[type="date"]::-webkit-calendar-picker-indicator,
.picker-wrap input[type="time"]::-webkit-calendar-picker-indicator {
    display: none; /* eigener Button statt Browser-Icon (einheitlich in allen Browsern) */
}
.picker-btn {
    cursor: pointer;
    color: #6c7a71; /* outline */
    font-size: 18px !important;
    line-height: 1;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
}
.picker-btn:hover {
    color: #006c49; /* primary */
}
.picker-wrap:has(input:disabled) .picker-btn {
    opacity: 0.3;
    pointer-events: none;
}

/* Aufklappliste für die Zeitauswahl (15-Minuten-Raster) */
.time-dropdown {
    position: fixed;
    z-index: 200;
    max-height: 224px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #bbcabf; /* outline-variant */
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    padding: 4px;
    display: flex;
    flex-direction: column;
    min-width: 92px;
}
.time-dropdown button {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.time-dropdown button:hover {
    background: #f2f4f6; /* surface-container-low */
}
.time-dropdown button.selected {
    background: #006c49; /* primary */
    color: #ffffff;
    font-weight: 600;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast-success {
    background-color: #10b981;
}
.toast-error {
    background-color: #ef4444;
}
.toast-warn {
    background-color: #f59e0b;
}

@keyframes toast-in {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
