/* Reset interno e isolamento dal tema WordPress */
.wptb-booking-wrapper,
.wptb-booking-wrapper * {
    box-sizing: border-box;
}

.wptb-booking-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 750px;
    margin: 30px auto;
    color: #2c3e50;
    line-height: 1.5;
    clear: both; /* Spinge via qualsiasi elemento prima e dopo */
    display: block;
    width: 100%;
    position: relative;
    z-index: 1;
}

.wptb-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    display: block;
    width: 100%;
    clear: both;
    overflow: hidden; /* Trattiene tutti i figli all'interno della scheda bianca */
}

.wptb-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1a1a1a;
}

.wptb-header p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
}

.wptb-form .wptb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.wptb-field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
}

.wptb-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    color: #444;
}

.wptb-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fafafa;
    transition: all 0.25s ease;
}

.wptb-field input:focus {
    outline: none;
    border-color: #0073aa;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}

.wptb-map-section {
    margin: 30px 0;
    border-top: 1px solid #eee;
    padding-top: 20px;
    clear: both;
    width: 100%;
}

.wptb-map-section h4, .wptb-fieldset-client h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

/* Contenitore Mappa con min-height per riservare lo spazio durante l'AJAX */
.wptb-map-container {
    position: relative;
    width: 100%;
    min-height: 250px; /* Riserva lo spazio prima che l'immagine finisca di caricarsi */
    background: #f4f6f8;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    display: block;
    clear: both;
}

.wptb-map-placeholder {
    color: #888;
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
}

.wptb-map-container img {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Pin sulla mappa - Formato flessibile per contenere il testo */
.wptb-table-pin {
    position: absolute;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    margin-left: -17px;
    margin-top: -17px;
    border-radius: 50px !important; /* Trasforma il cerchio in pillola se il testo è lungo */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
    z-index: 10;
    white-space: nowrap !important; /* Impedisce al testo di andare a capo */
    box-sizing: border-box;
}

.wptb-table-pin:hover {
    transform: scale(1.15);
}

/* 1. Verde = Libero */
.wptb-table-pin.disponibile {
    background: #10b981;
    color: #fff;
}

/* 2. Rosso = Occupato / Prenotato */
.wptb-table-pin.occupato {
    background: #ef4444;
    color: #fff;
}

/* 3. Celeste/Blu chiaro = Selezionato */
.wptb-table-pin.selezionato {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.4);
    transform: scale(1.2);
}

.wptb-table-info {
    margin-top: 10px;
    font-size: 13px;
    color: #0284c7;
    font-weight: 500;
}

.wptb-fieldset-client {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
    clear: both;
    width: 100%;
}

.wptb-submit-row {
    margin-top: 25px;
    clear: both;
    width: 100%;
}

.wptb-btn-primary {
    background-color: #0f172a;
    color: #fff;
    border: none;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
    display: block;
}

.wptb-btn-primary:hover {
    background-color: #1e293b;
}

.wptb-msg {
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.wptb-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fafafa;
    transition: all 0.25s ease;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.wptb-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}

/* Annulla forzatamente qualsiasi padding inline o calcolato dal plugin esterno */
div.fancy-select-wrap {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    margin-top: 0px !important;
}

/* 1. Allinea perfettamente il box del select agli altri input (spostandolo di 1-2px in alto) */
.wptb-field .fancy-select-wrap {
    margin-top: -2px !important;
}

/* 2. Uniforma l'etichetta (label) del campo orario esattamente a quella degli altri campi */
.wptb-field .fancy-select-wrap label,
.wptb-field .fancy-select-wrap .select2-selection__rendered {
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0 !important;
}