/* ============================================
   BOOKING MODAL - Boat Tour Polignano
   Colori tema sito: navy #022447, teal #33c7c5
   ============================================ */

/* Overlay */
.booking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 10, 25, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.booking-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.booking-modal {
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 30px 90px rgba(2, 36, 71, 0.55),
        0 0 0 1px rgba(51, 199, 197, 0.15);
    position: relative;
    animation: bookingSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bookingSlideIn {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Header */
.booking-modal-header {
    background: linear-gradient(135deg, #022447 0%, #011830 100%);
    padding: 28px 30px 24px;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}
.booking-modal-header::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 220px;
    height: 220px;
    background: radial-gradient(
        circle,
        rgba(51, 199, 197, 0.12) 0%,
        transparent 70%
    );
    border-radius: 50%;
}
.booking-modal-header::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 160px;
    height: 160px;
    background: radial-gradient(
        circle,
        rgba(51, 199, 197, 0.07) 0%,
        transparent 70%
    );
    border-radius: 50%;
}
.booking-modal-header h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    position: relative;
    font-family: "Spectral", serif;
}
.booking-modal-header h2 i {
    color: #33c7c5;
    margin-right: 8px;
}
.booking-modal-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    position: relative;
}
.booking-modal-header .booking-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    line-height: 1;
    z-index: 2;
}
.booking-modal-header .booking-close-btn:hover {
    background: rgba(51, 199, 197, 0.3);
    transform: rotate(90deg);
}

/* Body */
.booking-modal-body {
    padding: 28px 30px 10px;
}

/* Form Groups */
.booking-form-group {
    margin-bottom: 22px;
}
.booking-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #022447;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.booking-form-group label i {
    margin-right: 6px;
    color: #33c7c5;
}

/* Inputs */
.booking-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dce8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #022447;
    background: #f8fbff;
    transition: all 0.25s ease;
    outline: none;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}
.booking-input:focus {
    border-color: #33c7c5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(51, 199, 197, 0.12);
}
.booking-input::placeholder {
    color: #9fb3c8;
}

/* Time Slots */
.booking-time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.booking-time-slot {
    padding: 10px 8px;
    border: 2px solid #dce8f0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4a6680;
    background: #f8fbff;
    transition: all 0.2s ease;
    font-family: "Poppins", sans-serif;
}
.booking-time-slot:hover {
    border-color: #33c7c5;
    color: #022447;
    background: rgba(51, 199, 197, 0.08);
}
.booking-time-slot.selected {
    border-color: #022447;
    background: #022447;
    color: #33c7c5;
}
.booking-time-slot.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Guest Counter */
.booking-guest-counter {
    display: flex;
    align-items: center;
    gap: 16px;
}
.booking-guest-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #dce8f0;
    border-radius: 10px;
    background: #f8fbff;
    color: #022447;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.booking-guest-btn:hover {
    background: #022447;
    color: #33c7c5;
    border-color: #022447;
}
.booking-guest-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.booking-guest-count {
    font-size: 26px;
    font-weight: 800;
    color: #022447;
    min-width: 40px;
    text-align: center;
    font-family: "Spectral", serif;
}

/* Availability Badge */
.booking-availability {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}
.booking-availability.available {
    background: rgba(51, 199, 197, 0.12);
    color: #0a7a78;
}
.booking-availability.limited {
    background: rgba(243, 103, 39, 0.12);
    color: #c0400a;
}
.booking-availability.full {
    background: rgba(200, 50, 50, 0.1);
    color: #b52020;
}

/* Summary Card */
.booking-summary {
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f4f8 100%);
    border: 2px solid #c8dcea;
    border-left: 4px solid #33c7c5;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.booking-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
    color: #4a6680;
}
.booking-summary-row span:last-child {
    font-weight: 700;
    color: #022447;
}
.booking-summary-divider {
    border: none;
    border-top: 1px dashed #b0ccd8;
    margin: 10px 0;
}
.booking-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 2px;
}
.booking-summary-total .label {
    font-size: 12px;
    font-weight: 700;
    color: #022447;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.booking-summary-total .amount {
    font-size: 26px;
    font-weight: 800;
    color: #022447;
    font-family: "Spectral", serif;
}
.booking-deposit-note {
    font-size: 12px;
    color: #7a99b0;
    text-align: center;
    margin-top: 6px;
}

/* Footer / CTA */
.booking-modal-footer {
    padding: 10px 30px 28px;
}
.booking-pay-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #022447 0%, #011830 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    font-family: "Spectral", serif;
}
.booking-pay-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(51, 199, 197, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}
.booking-pay-btn:hover::before {
    left: 100%;
}
.booking-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(2, 36, 71, 0.4);
    background: linear-gradient(135deg, #033260 0%, #022447 100%);
}
.booking-pay-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.booking-pay-btn i {
    font-size: 17px;
    color: #33c7c5;
}

/* WhatsApp button variant (no Stripe) */
.booking-pay-btn .fa-whatsapp {
    color: #25d366;
    font-size: 20px;
}

/* Badge sotto il bottone */
.booking-stripe-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: #7a99b0;
}
.booking-stripe-badge i {
    color: #33c7c5;
}

/* Error */
.booking-error {
    background: rgba(200, 50, 50, 0.08);
    border-left: 3px solid #c53030;
    color: #8b1a1a;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.booking-error.show {
    display: block;
}

/* Success overlay */
.booking-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
    text-align: center;
}
.booking-success.show {
    display: flex;
}
.booking-success .checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #33c7c5, #0a8e8c);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(51, 199, 197, 0.35);
}
.booking-success .checkmark i {
    font-size: 38px;
    color: #fff;
}
.booking-success h3 {
    font-size: 22px;
    color: #022447;
    margin-bottom: 8px;
    font-family: "Spectral", serif;
}
.booking-success p {
    font-size: 14px;
    color: #5f6973;
}

/* Guest fields */
.booking-guest-fields {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #dce8f0;
}
.booking-guest-fields .booking-form-group {
    margin-bottom: 14px;
}

/* Scrollbar stilizzata */
.booking-modal::-webkit-scrollbar {
    width: 5px;
}
.booking-modal::-webkit-scrollbar-track {
    background: #f0f6ff;
}
.booking-modal::-webkit-scrollbar-thumb {
    background: #33c7c5;
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 576px) {
    .booking-modal {
        width: 96%;
        border-radius: 16px;
        max-height: 95vh;
    }
    .booking-modal-header {
        padding: 22px 20px 18px;
        border-radius: 16px 16px 0 0;
    }
    .booking-modal-body {
        padding: 20px 20px 8px;
    }
    .booking-modal-footer {
        padding: 8px 20px 22px;
    }
    .booking-time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    .booking-summary-total .amount {
        font-size: 22px;
    }
}
