/**
 * Booking Calendar WooCommerce - Styles
 */

/* ===== Sekcja główna ===== */
.bcw-booking-section {
    background: #f9f9f9;
    padding: 30px;
    margin: 30px 0;
    border-radius: 0;
    border: 1px solid #e0e0e0;
}

.bcw-booking-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

/* ===== Kontener kalendarza ===== */
.bcw-calendar-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Slider dat ===== */
.bcw-date-slider-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.bcw-date-slider {
    flex: 1;
    overflow: hidden;
    margin: 0 10px;
}

.bcw-date-slider-track {
    display: flex;
    transition: transform 0.3s ease;
}

.bcw-date-card {
    min-width: 70px;
    padding: 15px 10px;
    margin: 0 5px;
    text-align: center;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.bcw-date-card:hover {
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.bcw-date-card.selected {
    background: white;
    border-color: white;
    color: var(--color);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

.bcw-date-card.is-today {
    border-color: #46b450;
}

.bcw-date-card.is-today.selected {
    background: white;
    border-color: white;
}

.bcw-today-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #46b450;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 0;
    font-weight: bold;
    white-space: nowrap;
}

.bcw-day-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bcw-date-display {
    font-size: 18px;
    font-weight: bold;
}

/* Przyciski slidera */
.bcw-slider-prev,
.bcw-slider-next {
    background: white;
    border: 2px solid #ddd;
    border-radius: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 24px;
    color: #666;
}

.bcw-slider-prev:hover:not(:disabled),
.bcw-slider-next:hover:not(:disabled) {
    background: white;
    border-color: white;
    color: white;
    transform: scale(1.1);
}

.bcw-slider-prev:disabled,
.bcw-slider-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== Wybór godzin ===== */
.bcw-time-selection {
    margin-bottom: 25px;
}

.bcw-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 80px;
    padding: 20px;
    background: white;
    border-radius: 0;
    border: 1px solid #e0e0e0;
}

.bcw-time-slot {
    padding: 12px 24px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #333;
}

.bcw-time-slot:hover {
    border-color: white;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.bcw-time-slot.selected {
    background: white;
    border-color: white;
    color: white;
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

/* Komunikaty */
.bcw-select-date-first,
.bcw-loading,
.bcw-no-times,
.bcw-error {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.bcw-loading {
    color: white;
}

.bcw-no-times {
    color: #dc3232;
}

.bcw-error {
    color: #dc3232;
    font-weight: bold;
}

/* ===== Podsumowanie rezerwacji ===== */
.bcw-booking-summary {
    background: #e7f7e7;
    border: 2px solid #46b450;
    border-radius: 0;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bcw-booking-summary strong {
    display: block;
    font-size: 14px;
    color: #2d5c2d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bcw-summary-text {
    font-size: 20px;
    font-weight: bold;
    color: #2d5c2d;
    margin: 0;
}

/* ===== Panel admina ===== */
.bcw-admin-booking-info {
    background: #f0f8ff;
    border: 1px solid white;
    border-radius: 0;
    padding: 15px;
    margin: 15px 0;
}

.bcw-admin-booking-info h3 {
    margin-top: 0;
    color: white;
}

.bcw-admin-booking-info p {
    margin-bottom: 0;
    line-height: 1.6;
}

/* ===== Responsywność ===== */
@media (max-width: 768px) {
    .bcw-booking-section {
        padding: 20px 15px;
    }

    .bcw-booking-section h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .bcw-date-card {
        min-width: 60px;
        padding: 12px 8px;
        margin: 0 3px;
    }

    .bcw-day-name {
        font-size: 11px;
    }

    .bcw-date-display {
        font-size: 16px;
    }

    .bcw-slider-prev,
    .bcw-slider-next {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .bcw-time-slot {
        padding: 10px 18px;
        font-size: 14px;
    }

    .bcw-summary-text {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .bcw-date-card {
        min-width: 55px;
        padding: 10px 6px;
    }

    .bcw-date-display {
        font-size: 14px;
    }

    .bcw-time-slots {
        gap: 8px;
        padding: 15px;
    }

    .bcw-time-slot {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ===== Styl dla listy rezerwacji w adminie ===== */
.wp-list-table.bcw-bookings-table {
    margin-top: 20px;
}

.wp-list-table.bcw-bookings-table th,
.wp-list-table.bcw-bookings-table td {
    padding: 12px;
}

/* ===== Dark mode support ===== */
@media (prefers-color-scheme: dark) {
    .bcw-booking-section {
        background: var(--color);
        border-color: var(--color);
    }

    .bcw-booking-section h3 {
        color: #e0e0e0;
    }

    .bcw-date-card {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }

    .bcw-date-card:hover {
        border-color: white;
    }

    .bcw-time-slots {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }

    .bcw-time-slot {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }

    .bcw-time-slot:hover {
        background: #1a3a5a;
        border-color: white;
    }

    .bcw-slider-prev,
    .bcw-slider-next {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }
}

/* ===== Accessibility ===== */
.bcw-date-card:focus,
.bcw-time-slot:focus,
.bcw-slider-prev:focus,
.bcw-slider-next:focus {
    outline: 3px solid white;
    outline-offset: 2px;
}

/* Dla czytników ekranu */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.bcw-date-card.is-today.selected {
    background: #08251d;
    border-color: white;
    border-radius: 0;
}
.bcw-date-card {
    border-radius: 0;
    background-color: #0e3a2e;
}
    .bcw-time-slots {
        background: #0e3a2e;
        border-color: transparent;
    }
        .bcw-time-slot {
            background: var(--color);
            border-color: #0e3a2e;
            color: #e0e0e0;
        }
        .bcw-time-slot.selected {
            color: var(--color);
        }
        .bcw-date-card.is-today.selected {
    color: white;
}
form.checkout.woocommerce-checkout {
    display: grid;
    grid-template-columns: calc((100% - 50px) / 2) calc((100% - 50px) / 2);
    margin-bottom: 100px;
    gap: 50px;
}

@media screen and (max-width: 1100px){
    form.checkout.woocommerce-checkout {
        grid-template-columns: 100%;
    }
}
.woocommerce-additional-fields {
    display: none;
}
.woocommerce table.shop_table {
    border: 1px solid var(--color) !important;
    border-radius: 0 !important;
}
.woocommerce table.shop_table td, .woocommerce table.shop_table tbody th, .woocommerce table.shop_table tfoot td, .woocommerce table.shop_table tfoot th {
    border-top: 1px solid var(--color) !important;
    min-width: 100px;
}
#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment {
    background: rgb(243 249 248);
    border-radius: 5px;
}
#add_payment_method #payment div.payment_box, .woocommerce-cart #payment div.payment_box, .woocommerce-checkout #payment div.payment_box {
    background: white !important;
}
#add_payment_method #payment div.payment_box::before, .woocommerce-cart #payment div.payment_box::before, .woocommerce-checkout #payment div.payment_box::before {

    border-bottom: 1em solid #dcd7e2 !important;
}
button#place_order {
    padding: 15px 30px;
    margin-top: 20px;
    background: var(--color);
}