/* Ogólny styl dla body */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-x: hidden;
    background-color: #f4f4f4; /* Tło poza sekcjami (szare) */
}

/* Kontener dla sekcji */
.container {
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto; /* Dodano marginesy na górze i dole */
    flex-grow: 1;
    overflow-y: auto;
    box-sizing: border-box;
    background-color: #fff; /* Białe tło dla zawartości */
    border: 1px solid #ccc; /* Cienka ramka */
    border-radius: 10px; /* Zaokrąglenie narożników */
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* Delikatny cień */
}

/* Styl dla sekcji wewnątrz kontenera */
section {
    margin-bottom: 20px;
    padding: 20px;
    text-align: left; /* Ustawiamy wyrównanie do lewej */
    border-radius: 8px; /* Zaokrąglenie ramki sekcji */
    border: 1px solid #ddd; /* Cienka ramka wewnętrzna */
    background-color: #fff; /* Tło sekcji */
}

/* Styl nagłówka */
header {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center; /* Wyrównanie logo i tytułu w pionie */
    justify-content: center;
    gap: 15px;
}

header img {
    height: calc(2.8 * 2rem); /* Wysokość logo = 1.5x wysokości h1 */
    width: auto;
}

header h1 {
    font-size: 2rem;
    margin: 0;
}

/* Stopka */
footer {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    width: 100%;
    margin-top: 20px; /* Dodano odstęp nad stopką */
}

/* Styl dla instrukcji */
.instructions {
    padding: 20px;
    text-align: left; /* Wyrównanie tekstu instrukcji do lewej */
}

/* Formularz */
form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

tablica-wynik {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Grupa wejściowa */
.input-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    gap: 10px;
}

/* Pole wyboru i tekstowe */
select, input[type="text"] {
    font-size: 1.5em;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    width: 60px;
    text-transform: uppercase; /* Automatyczna zamiana na wielkie litery */
}

/* Pole wyboru i tekstowe */
select {
    height: 85px;
}

/* Pole wyboru i tekstowe */
input[type="text"] {
    height: 80px;
}

/* Przycisk "Sprawdź" */
button {
    width: calc(60px * 8 + 10px * 7); /* Szerokość przycisku to suma szerokości wszystkich pól */
    height: 40px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Wizualizacja tablicy */
.plate {
    width: calc(60px * 8 + 10px * 7); /* Dopasowanie szerokości tablicy do formularza */
    height: 100px;
    background-color: white;
    border: 2px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    color: black;
    position: relative;
    letter-spacing: 15px;
    margin-top: 20px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* Niebieski pasek po lewej stronie tablicy */
.plate::before {
    content: '';
    background-color: #1B64B0;
    width: 50px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-right: 2px solid black;
}

/* Wyrównanie tekstu tablicy */
.plate span {
    margin-left: 60px;
}

/* Stylizacja komunikatów */
p {
   /* text-align: left; */
    font-size: 16px;
}

/* Wyróżnienie elementów formularza */
input:invalid, select:invalid {
    border-color: red;
}

input:valid, select:valid {
    border-color: green;
}

/* Dodatkowe informacje */
.additional {
    padding: 20px;
    min-height: 200px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Dodatkowe style dla listy i nagłówków */
ol {
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: decimal;
}

h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Linki */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Styl dla responsywnych urządzeń */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    header {
        padding: 15px;
        flex-direction: column; /* Logo i tytuł pod sobą */
    }

    footer {
        padding: 15px 0;
    }

    section {
        margin-bottom: 15px;
    }

    button {
        width: 100%; /* Na węższych ekranach przycisk zajmuje całą szerokość */
    }
}

/* Styl dla komunikatów formularza */
.form-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

/* Styl komunikatu informującego, że wartość jest w bazie */
.form-message.success {
    background-color: #e6ffed;
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

/* Styl komunikatu informującego, że wartość nie jest w bazie */
.form-message.error {
    background-color: #ffeded;
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

/* Wizualizacja tablicy - stan zajęty */
.plate.occupied {
    background-color: #e0e0e0;
    color: #9e9e9e;
    position: relative;
    /* text-decoration: line-through; */
}

.plate.occupied .plate-letters {
    color: #9e9e9e;
    text-decoration: none;
}

.plate.occupied .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    font-weight: bold;
    color: #ff0000;
    background: rgba(255, 255, 255, 0.6);
    z-index: 1;
}

/* Wizualizacja tablicy - stan wolny */
.plate.available {
    background-color: white;
    color: black;
}

/* ---------------------------------------
----------- P A N E L --------------------
--------------------------------------- */

/* Stylizacja panelu administracyjnego */
.panel-container {
    padding: 20px;
    max-width: 800px;
    margin: 40px auto;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.panel-container h2 {
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
}

.panel-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.panel-container .input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.panel-container .input-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.panel-container .input-group input {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.panel-container button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.panel-container button:hover {
    background-color: #45a049;
}

/* Komunikaty */
.panel-container .form-message {
    font-size: 0.9em;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
}

.panel-container .form-message.error {
    background-color: #ffeded;
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

.panel-container .form-message.success {
    background-color: #e6ffed;
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

/* Kontener dla pola wejściowego i komunikatu */
.input-container {
    position: relative;
    margin-bottom: 5px;
}

/* Styl dla pól z błędami */
input.invalid {
    border-color: red;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Styl komunikatu o błędzie */
.error-message {
    display: none;
    font-size: 0.9em;
    color: red;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    z-index: 10;
}

/* Ogólny komunikat o błędach */
.general-error {
    margin-top: 20px;
    font-size: 1em;
    color: red;
    font-weight: bold;
    text-align: center;
}

.input-group {
    margin-top: 5px;
}

.instruction-group {
    position: relative;
    margin-bottom: 2em;
}

.fields {
    display: flex;
    gap: 0.5em;
}

.horizontal-bracket {
    position: relative;
    margin-top: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.horizontal-bracket::before {
    content: "";
    position: absolute;
    bottom: 50%;
    width: 100%;
    height: 3px; /* Grubość klamry */
    background-color: #000; /* Kolor klamry */
    z-index: 1;
}

.instruction {
    font-size: 0.9em;
    color: #555; /* Ciemnoszary kolor */
    text-align: center;
    width: 100%;
}

/* Pozioma kreska z zakończeniami */
.horizontal-line {
    width: 100%;
    display: flex;
    align-items: center;
    color: #555; /* Ciemnoszary kolor */
    font-weight: bold;
    position: relative;
}

/* Linia pozioma */
.horizontal-line span {
    flex-grow: 1;
    height: 2px;
    background-color: #555;
    margin: 0 px; /* Odstępy od pionowych zakończeń */
	margin-top: 3px;
	margin-bottom: 12px
}


.horizontal-line::before,
.horizontal-line::after {
    content: '';
    width: 1px; /* Grubość pionowego elementu dopasowana do poziomej linii */
    height: 10px; /* Długość pionowego elementu */
    background-color: #555; /* Ciemnoszary kolor */
    position: absolute;
    top: 5px; /* Ustawienie pionowego elementu tylko w górę */
}

.horizontal-line::before {
    left: 0;
    height: 10px;
    border-left: 2px solid #555; /* Pionowy element */
}

.horizontal-line::after {
    right: 0;
    height: 10px;
	
    border-right: 2px solid #555; /* Pionowy element */
}




.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-message {
    display: none;
    color: red;
    font-size: 0.8em;
    margin-top: 0.3em;
}

.general-error {
    margin-top: 1em;
    color: red;
    font-size: 1em;
    font-weight: bold;
    display: block;
}
