* {
    font-family: "Alegreya Sans SC", sans-serif;
    font-style: normal;
}

/* Reset i podstawowe style */
body {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: #000;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
}

h1 {
    text-align: center;
    color: #000;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 600;
}

div#main-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 10px;
}

/* Karty zajęć - minimalistyczny design z cieniami */
.class-container {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 24px;
    transition: all 0.2s ease;
    margin-left: 0;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.class-container:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.vacation-info {
    margin-top: 15px;
    margin-left: -10px;
    margin-bottom: 10px;
    padding: 12px;
    font-size: 1rem;
}

/* Tabele z informacjami */
.booking-info table,
.class-info table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.booking-info td,
.class-info td {
    padding: 6px 0;
    vertical-align: top;
}

.booking-info td:first-child,
.class-info td:first-child {
    font-weight: 600;
    width: 35%;
    color: #333;
}

.booking-info td:last-child,
.class-info td:last-child {
    color: #000;
}

/* Przyciski - minimalistyczne z cieniami */
button {
    border: 1px solid #000;
    padding: 12px 20px;
    border-radius: 0;
    margin-top: 16px;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.2s ease;
    background-color: transparent;
    color: #000;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
    box-shadow: none;
}

.btn-return:hover {
    background-color: #dadada;
}

.btn-book:hover,
.btn-cancel:hover {
    background-color: #727272;
    color: #fff;
}

.btn-cancel,
.btn-return,
.btn-book {
    border-color: #000;
    color: #000;
    font-weight: 300;
    display: flex;
    align-items: center; /* wyśrodkowanie pionowe */
    justify-content: center; /* wyśrodkowanie poziome */
}

/* Style dla tekstów w przycisku */
.submit-text, .htmx-indicator {
    display: inline-block;
    text-align: center;
    width: 100%;
}

/* Ukrycie wskaźnika ładowania domyślnie */
.htmx-indicator {
    display: none;
}

/* Pokazanie wskaźnika ładowania podczas przetwarzania */
.btn-book.htmx-request .htmx-indicator {
    display: inline-block;
}

.btn-book.htmx-request .submit-text {
    display: none;
}

/* Komunikaty o błędach */
.err-msg {
    font-size: 0.8rem;
    color: #d32f2f;
    height: auto;
    line-height: 1.4;
    margin-top: 12px;
    margin-bottom: 0;
    white-space: normal;
    word-wrap: break-word;
    border-left: 2px solid #d32f2f;
    padding-left: 8px;
}

.pending-operation {
    font-size: 0.8rem;
    color: #d32f2f;
    height: auto;
    border-left: 2px solid #d32f2f;
    padding-left: 8px;
}

.text-gray {
    color: #757575;
}

/* Responsywność */
@media (max-width: 768px) {
    div#main-container {
        grid-template-columns: 1fr;
    }

    .class-container {
        padding: 20px;
    }

    body {
        padding: 16px;
    }
}

/* Animacja ładowania HTMX */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

.form-input {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    margin-top: 5px;
    margin-bottom: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 0;
    font-size: 1rem;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

* {
    font-family: "Alegreya Sans SC", sans-serif;
    font-style: normal;
}

.cancel-booking-card, .confirmation-card, .error-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 24px;
    transition: all 0.2s ease;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    width: 100%; /* Pełna szerokość kontenera */
    max-width: 400px; /* Maksymalna szerokość */
    display: flex;
    flex-direction: column;
    margin: 0 auto; /* Wyśrodkowanie poziome */
}

.cancel-booking-card:hover,
.confirmation-card:hover, .error-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cancel-booking-card,
.confirmation-card, .error-card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.confirmation-message, .error-message {
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 30px;
    margin-top: 40px;
}

.booking-info {
    margin-bottom: 40px;
}

/* Dodatkowe style dla responsywności */
@media (max-width: 480px) {
    .cancel-booking-card,
    .confirmation-card, .error-card {
        max-width: 90%; /* Mniejsza szerokość na małych ekranach */
        padding: 16px;
    }

    .cancel-booking-container,
    .confirmation-container, .error-container {
        min-height: 300px;
        padding: 16px;
    }

    .cancel-booking-card,
    .confirmation-card .error-card {
        padding: 15px;
        font-size: 1.5rem;
    }
}