/* Dodanie FontAwesome (opcjonalnie) */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/* Resetowanie globalnych styli dla kontenera wtyczki */
#wp-bp-booking-container {
    font-family: 'Montserrat', 'Roboto', sans-serif;
    background-color: #121212;
    color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin: 0 auto;
    background-image: linear-gradient(to bottom, #141414, #121212);
}

/* Poprawa nawigacji dat */
.wp-bp-navigation {
    display: flex;
    gap: 7px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: #222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

#wp-bp-current-date, #wp-bp-current-date2 {
    position: relative;
    padding: 5px 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    display: inline-block;
    min-width: 200px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    flex-grow: 1;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

#wp-bp-prev, #wp-bp-next {
    background-color: #333;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#wp-bp-prev:hover, #wp-bp-next:hover {
    background-color: #e63946;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
}

#wp-bp-prev:after, #wp-bp-next:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(230,57,70,0.5) 0%, rgba(230,57,70,0) 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

#wp-bp-prev:hover:after, #wp-bp-next:hover:after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Kontener slotów */
#wp-bp-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* Style dla nagłówków dni */
.wp-bp-day-header {
    grid-column: 1 / -1;
    padding: 15px 20px;
    background-color: #1a1a1a;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    margin-top: 20px;
    border-radius: 6px;
    text-transform: capitalize;
    border-left: 4px solid #e63946;
    display: flex;
    align-items: center;
}

.wp-bp-day-header:before {
    content: '\f133'; /* Kod ikony kalendarza FontAwesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900; /* To jest ważne dla Font Awesome 5 */
    margin-right: 10px;
    color: #e63946;
}

/* Grupowanie slotów w dniu */
.wp-bp-day-slots {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin: 10px 0 20px;
}

/* Style dla slotów rezerwacji */
.wp-bp-slot {
    background-color: #222;
    color: #ffffff;
    padding: 15px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(to bottom, rgba(50, 50, 50, 0.1), rgba(20, 20, 20, 0.1));
}

.wp-bp-slot:hover {
    background-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.2);
    border-color: #e63946;
}

/* POPRAWKA: Efekt podświetlenia przy najechaniu z zachowaniem zaokrąglonych rogów */
.wp-bp-slot:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(230, 57, 70, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 6px; /* Dodano zaokrąglenie pasujące do elementu rodzica */
}

.wp-bp-slot:hover:before {
    opacity: 1;
}

/* POPRAWKA: Animowany border dla slotów z poprawionym zaokrągleniem */
.wp-bp-slot:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #e63946, transparent, #e63946);
    background-size: 400% 400%;
    opacity: 0;
    z-index: -1;
    transition: all 0.3s ease;
    border-radius: 6px; /* Poprawione zaokrąglenie */
    mask-image: radial-gradient(white, black); /* Dodanie maski dla obsługi zaokrąglonych rogów */
    -webkit-mask-image: radial-gradient(white, black);
}

.wp-bp-slot:hover:after {
    opacity: 0.3;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

.wp-bp-slot span {
    font-weight: 500;
    font-size: 16px;
}

/* Nowe style dla slotów czasowych */
.wp-bp-slot-time {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* POPRAWKA: Style dla ceny z zapobieganiem łamania linii */
.wp-bp-slot-price {
    font-size: 14px;
    color: #e63946;
    font-weight: 500;
    white-space: nowrap; /* Zapobiega łamaniu linii */
    display: inline-block; /* Lepsze zachowanie podczas animacji */
}

/* Subtelny efekt zwiększający jasność tekstu */
.wp-bp-slot:hover .wp-bp-slot-time,
.wp-bp-slot:hover .wp-bp-slot-price {
    color: #e63946;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Poprawione style dla cennika przy hoverze */
.wp-bp-slot:hover .wp-bp-slot-price {
    color: #ff6b6b;
    font-weight: bold;
}

/* POPRAWKA: Zmodyfikowana animacja pulsacji ceny przy najechaniu */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/*.wp-bp-slot:hover .wp-bp-slot-price {
    animation: pulse 1.5s infinite;
}*/

/* Wybrane sloty */
.wp-bp-slot.selected {
    background-color: #e63946;
    border-color: #e63946;
    color: white;
    transform: translateY(-3px);
}

.wp-bp-slot.selected:hover:before {
    opacity: 0; /* Wyłączenie efektu najechania dla wybranego slotu */
}

.wp-bp-slot.selected .wp-bp-slot-time,
.wp-bp-slot.selected .wp-bp-slot-price {
    color: white;
    animation: none; /* Wyłączenie animacji dla wybranego slotu */
}

/* Wskaźnik wyboru slotu */
.wp-bp-slot-selected-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    z-index: 5;
    display: none;
    pointer-events: none;
    border-radius: 6px; /* Dodano zaokrąglenie */
}

/* Formularz rezerwacji */
#wp-bp-booking-form {
    background-color: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-top: 20px;
}

#wp-bp-booking-form form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#wp-bp-booking-form form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ccc;
}

#wp-bp-booking-form form input,
#wp-bp-booking-form form textarea,
#wp-bp-booking-form form select {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #333;
    color: #ffffff;
    transition: all 0.3s ease;
}

#wp-bp-booking-form form input:focus,
#wp-bp-booking-form form textarea:focus,
#wp-bp-booking-form form select:focus {
    border-color: #e63946;
    outline: none;
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2);
}

/* Style dla textaera na pełną szerokość */
#wp-bp-booking-form form textarea {
    grid-column: span 2;
    resize: vertical;
    min-height: 100px;
}

/* Style dla checkbox */
#wp-bp-booking-form form input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

/* Dane do faktury */
#invoiceData {
    grid-column: span 2;
}

/* Przycisk rezerwacji */
#wp-bp-booking-form form button {
    grid-column: span 2;
    background-color: #e63946;
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#wp-bp-booking-form form button:hover {
    background-color: #c1121f;
}

/* Komunikaty o rezerwacji */
#wp-bp-response {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

#wp-bp-response p {
    margin: 0;
    color: #ffffff;
}

/* Komunikat o sukcesie */
#wp-bp-response.success {
    background-color: rgba(39, 174, 96, 0.2);
    border: 1px solid #27ae60;
}

/* Komunikat o błędzie */
#wp-bp-response.error {
    background-color: rgba(230, 57, 70, 0.2);
    border: 1px solid #e63946;
}

/* Wyświetlanie ceny */
#priceDisplay {
    grid-column: span 2;
    background-color: #222;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 18px;
    margin: 10px 0;
}

#priceValue {
    font-weight: 700;
    color: #e63946;
}

/* Loader podczas ładowania slotów */
.wp-bp-loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #ccc;
    font-style: italic;
}

/* Wyświetlanie wybranego terminu */
#selected-date-display {
    background-color: #222;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    border-left: 4px solid #e63946;
}

/* Animacje przejść */
.wp-bp-slot, #wp-bp-prev, #wp-bp-next, #wp-bp-booking-form form button {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Efekty hover i aktywne */
.wp-bp-slot:active {
    transform: scale(0.98);
}

#wp-bp-prev:active, #wp-bp-next:active, #wp-bp-booking-form form button:active {
    transform: scale(0.95);
}

/* Dodatkowy styl dla ukrytych elementów */
.wp-bp-hidden {
    display: none;
}

/* Komunikat o braku dostępnych slotów */
#wp-bp-slots p {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background-color: #222;
    border-radius: 6px;
    color: #aaa;
    font-style: italic;
}

/* Responsywność */
@media (max-width: 768px) {
    #wp-bp-booking-form form {
        grid-template-columns: 1fr;
    }

    #wp-bp-booking-form form textarea,
    #invoiceData,
    #wp-bp-booking-form form button,
    #priceDisplay {
        grid-column: span 1;
    }

    #wp-bp-slots {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .wp-bp-navigation {
        flex-direction: column;
    }

    .wp-bp-navigation span {
        font-size: 14px !important;
    }
}

@media (max-width: 600px) {
    .wp-bp-day-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .wp-bp-slot-time {
        font-size: 16px;
    }

    .wp-bp-slot-price {
        font-size: 12px;
    }

    #wp-bp-current-date {
        font-size: 16px;
    }
}
