/* ═══════════════════════════════════════════════════════════════
   ISOLA CONNECT v2.1 - STILI MODULO DIVING
   File: diving-booking.css
   Posizione: public/diving-booking.css
   ═══════════════════════════════════════════════════════════════ */

/* ══ POPUP CONTAINER ══ */
.diving-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    animation: divFadeIn 0.2s ease;
}

@keyframes divFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes divSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.diving-content {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 20px 20px 40px;
    position: relative;
    animation: divSlideUp 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar sottile */
.diving-content::-webkit-scrollbar {
    width: 4px;
}
.diving-content::-webkit-scrollbar-track {
    background: transparent;
}
.diving-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* ══ HEADER ══ */
.diving-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}

.diving-header .booking-icon {
    font-size: 40px;
    margin-bottom: 4px;
}

.diving-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
}

.diving-cert {
    color: #0077B6;
    font-weight: 600;
    font-size: 13px;
    margin-top: 4px;
}

/* ══ CHIUDI ══ */
.diving-popup .booking-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.diving-popup .booking-close:hover {
    background: #e0e0e0;
}

/* ══ STEP 1: GRIGLIA TIPOLOGIE ══ */
.diving-step-title {
    text-align: center;
    margin-bottom: 16px;
    font-size: 17px;
    color: #333;
    font-weight: 600;
}

.diving-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 4px;
}

.diving-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 10px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.diving-type-btn:hover {
    border-color: #0077B6;
    background: #E8F6FC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.15);
}

.diving-type-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.diving-type-icon {
    font-size: 36px;
    line-height: 1;
}

.diving-type-name {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.2;
}

.diving-type-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.2;
}

.diving-type-price {
    font-size: 13px;
    font-weight: 600;
    color: #0077B6;
    margin-top: 2px;
    background: #E8F6FC;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ══ STEP 2: FORM ══ */
.diving-back-btn {
    background: none;
    border: none;
    color: #0077B6;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 4px;
    display: inline-block;
}

.diving-back-btn:hover {
    text-decoration: underline;
}

.diving-selected-badge {
    background: linear-gradient(135deg, #E8F6FC, #D4EFFC);
    border: 1px solid #B8E2F8;
    border-radius: 12px;
    padding: 10px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: #0077B6;
    margin-bottom: 16px;
}

/* ══ SEZIONI FORM ══ */
.div-form-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.div-form-section:last-of-type {
    border-bottom: none;
}

.div-section-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

/* ══ CAMPI FORM ══ */
.div-form-group {
    margin-bottom: 14px;
}

.div-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.div-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.div-input:focus {
    outline: none;
    border-color: #0077B6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.div-input::placeholder {
    color: #bbb;
}

textarea.div-input {
    resize: vertical;
    min-height: 60px;
}

select.div-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.div-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ══ NUMBER SELECTOR ══ */
.div-number-selector {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.div-num-btn {
    flex: 1;
    padding: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

.div-num-btn.selected {
    border-color: #0077B6;
    background: #0077B6;
    color: #fff;
}

.div-num-btn:hover:not(.selected) {
    border-color: #0077B6;
    background: #E8F6FC;
}

/* ══ RADIO GROUP ══ */
.div-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 6px;
}

.div-radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.div-radio-option input[type="radio"] {
    accent-color: #0077B6;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ══ INFO BOX ══ */
.div-info-box {
    background: #E8F6FC;
    border-left: 3px solid #0077B6;
    border-radius: 0 10px 10px 0;
    padding: 12px 14px;
    font-size: 13px;
    color: #0077B6;
    line-height: 1.5;
    margin-top: 12px;
}

.div-info-warning {
    background: #FFF8E1;
    border-left-color: #FFA000;
    color: #E65100;
}

/* ══ SUBMIT BUTTON ══ */
.div-submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #0077B6, #00B4D8);
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
    letter-spacing: 0.3px;
}

.div-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 119, 182, 0.4);
}

.div-submit-btn:active {
    transform: translateY(0);
}

.div-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.div-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 12px;
}

/* ══ STEP 3: CONFERMA ══ */
.diving-confirmation {
    text-align: center;
    padding: 20px 0;
}

.diving-confirm-icon {
    font-size: 56px;
    margin-bottom: 12px;
    animation: divBounce 0.5s ease;
}

@keyframes divBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.diving-confirmation h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1a1a1a;
}

.diving-confirmation p {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px;
}

.diving-confirm-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    text-align: left;
}

.div-confirm-row {
    padding: 6px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
}

.div-confirm-row:last-child {
    border-bottom: none;
}

.div-confirm-row strong {
    color: #555;
}

/* Pulsanti conferma */
.diving-confirm-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0 16px;
}

.div-btn-whatsapp {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.div-btn-whatsapp:hover {
    background: #1DAE54;
}

.div-btn-call {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.div-btn-call:hover {
    background: #e0e0e0;
}

.div-btn-close {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.div-btn-close:hover {
    border-color: #ccc;
    background: #f8f8f8;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 380px) {
    .diving-type-grid {
        grid-template-columns: 1fr;
    }
    
    .diving-type-btn {
        flex-direction: row;
        gap: 12px;
        text-align: left;
        padding: 14px 16px;
    }
    
    .diving-type-icon {
        font-size: 28px;
        min-width: 36px;
    }
    
    .div-form-row {
        grid-template-columns: 1fr;
    }
}

/* Desktop */
@media (min-width: 501px) {
    .diving-content {
        border-radius: 20px;
        margin: auto;
        max-height: 85vh;
    }
    
    .diving-popup {
        align-items: center;
    }
}
