﻿body {
    background-color: #f4f6f9; /* Nowoczesne, jasne tło */
    font-family: 'Inter', sans-serif;
    color: #343a40;
    padding-bottom: 40px;

}

/* Styl dla zablokowanego przycisku kopiowania */
.btn-copy-times.disabled {
    cursor: not-allowed !important;
    background-color: #e9ecef !important; /* Jasnoszary */
    color: #6c757d !important; /* Szary tekst */
    pointer-events: all !important; /* Pozwala na pokazanie kursora 'not-allowed' */
}

/* Jeśli to jest link w dropdownie */
a.dropdown-item.btn-copy-times.disabled {
    pointer-events: all !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Stylizacja Kart */
.card-custom {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 24px;
    background: #fff;
}

.card-header-custom {
    background-color: #fff;
    border-bottom: 1px solid #edf2f7;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    color: #0d6efd;
    background: #e7f1ff;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Formularze */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

    .form-control:focus, .form-select:focus {
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
        border-color: #86b7fe;
    }

/* Tabele */
.table-modern td {
    white-space: nowrap; /* Zapobiega łamaniu linii w komórkach */
    padding: 8px 4px;
}

.table-modern input[type="datetime-local"] {
    min-width: 150px; /* Zapewnia czytelność daty */
}

.vehicle-driver-name {
    min-width: 140px;
    text-align: center; /* Nazwisko lepiej czyta się od lewej */
    padding-left: 10px !important;
}

/* Przyciski */
.btn-action-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Input Group Text (np. "g:", ":") */
.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Poprawiony pasek dolny */
.action-bar {
    background: rgba(255, 255, 255, 0.95); /* Lekka przezroczystość dla efektu modern */
    backdrop-filter: blur(10px); /* Efekt rozmycia tła pod paskiem */
    padding: 12px 0;
    border-top: 1px solid #dee2e6;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1050; /* Standardowy z-index Bootstrapa dla elementów stałych */
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}

/* Kontener wewnątrz paska musi pasować do głównego kontenera */
.action-bar .container {
    max-width: 1100px; /* Taka sama szerokość jak .main-container */
}

.dropdown-menu {
    z-index: 1050; /* Wyżej niż standardowe elementy tabeli */
}

.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 30px;
    padding-bottom: 60px; /* miejsce na stopkę */
}

body.modal-open {
    padding-right: 0 !important;
    overflow-y: scroll;
}

/* Opcjonalnie: upewnij się, że stały pasek nie psuje wyglądu na innych podstronach */
html {
    overflow-y: scroll;
}

body.swal2-shown {
    padding-right: 0 !important;
}

/* Styl dla zablokowanego wiersza w modalu */
.row-disabled {
    background-color: #f8f9fa !important;
    color: #adb5bd !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

    .row-disabled input[type="checkbox"] {
        pointer-events: none;
    }

.row-error {
    background-color: #f8d7da !important; /* Jasnoczerwony */
}


#obsadaTableBody td {
    position: relative;
    vertical-align: top; /* Ważne, aby inputy nie skakały */
    padding-bottom: 20px !important; /* Rezerwujemy miejsce na błąd poniżej */
}

.row-error td {
    background-color: #fff5f5 !important;
    position: relative;
    vertical-align: top;
    padding-bottom: 20px !important;
}

.error-message {
    position: absolute;
    left: 10px;
    bottom: 2px;
    color: #dc3545;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
}

/* Zmniejszenie wysokości inputów, aby nie "rozpychały" wiersza */
.table-modern .form-control-sm {
    height: calc(1.5em + 0.5rem + 2px);
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Usunięcie domyślnych obramowań tabeli dla efektu "lekkości" */
.table-modern {
    border-collapse: separate;
    border-spacing: 0 8px; /* Odstępy między wierszami */
}

.table-modern tbody tr {
    background-color: #fff;
    transition: transform 0.2s;
}

.table-modern tbody tr:hover {
    transform: scale(1.002);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}

.table-modern td:first-child { border-radius: 8px 0 0 8px; }
.table-modern td:last-child { border-radius: 0 8px 8px 0; }

/* Zapobiega wychodzeniu tabeli poza kontener */
.table-modern {
    table-layout: fixed; /* Wymusza trzymanie się zdefiniowanych szerokości */
    width: 100% !important;
    margin-bottom: 0 !important;
}

    /* Zmniejsza paddingi w komórkach, żeby zaoszczędzić miejsce poziome */
    .table-modern td, .table-modern th {
        padding-left: 4px !important;
        padding-right: 4px !important;
        overflow: hidden; /* Na wypadek długich nazw */
    }

    /* Sprawia, że inputy daty nie mają własnych marginesów */
    .table-modern .form-control-sm {
        margin: 0 auto;
        width: 100%;
    }

/* Ukrywa scrollbar w kontenerze table-responsive, jeśli zawartość wystaje o 1-2px */
.table-responsive {
    overflow-x: hidden !important;
    overflow: visible !important;
}
/* Stylowanie tabeli pojazdów w edycji */
#selectedVehiclesTable thead th {
    font-weight: 700;
    color: #495057;
    padding: 12px 5px;
}

#selectedVehiclesTable tbody tr {
    transition: all 0.2s;
}

/* Wyraźniejsze komórki z godzinami */
#selectedVehiclesTable td input[type="time"],
#selectedVehiclesTable td input[type="datetime-local"] {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Oznaczenie operacyjne pojazdu */
.vehicle-badge {
    background-color: #f8f9fc;
    border: 1px solid #e3e6f0;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 800;
    color: #4e73df;
    display: inline-block;
}

/* Przycisk usuwania */
.btn-remove-vehicle {
    color: #e74a3b;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-remove-vehicle:hover {
        color: #be2617;
        transform: scale(1.1);
    }