/* Prenotazione Posti - Frontend v3 */
#pp-booking-app {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}

.pp-form-container h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2e7d32;
    color: #2e7d32;
}

/* Fields */
.pp-field {
    margin-bottom: 16px;
}
.pp-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}
.pp-field input,
.pp-field select,
.pp-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    background-color: #fff;
    color: #333;
}

/* Select wrapper */
#pp-booking-app .pp-select-wrap {
    position: relative;
    display: block;
}
#pp-booking-app .pp-select-wrap select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer;
    padding: 12px 40px 12px 12px !important;
    background: #fff !important;
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 44px !important;
    position: relative;
    z-index: 1;
}
#pp-booking-app .pp-select-wrap select option {
    color: #333;
    font-size: 15px;
}
#pp-booking-app .pp-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    pointer-events: none;
    z-index: 2;
}
#pp-booking-app .pp-select-wrap select + *,
#pp-booking-app .pp-select-wrap select ~ svg,
#pp-booking-app .pp-select-wrap select ~ i,
#pp-booking-app .pp-select-wrap select ~ span,
#pp-booking-app .pp-select-wrap select ~ .icon {
    display: none !important;
}

.pp-field input:focus,
.pp-field select:focus,
.pp-field textarea:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

/* Divider */
.pp-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 24px 0;
}

/* Disponibilita */
.pp-disponibilita {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 15px;
}
.pp-disp-ok {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
}
.pp-disp-piena {
    background: #ffebee;
    border: 1px solid #e53935;
    color: #c62828;
}

/* Buttons */
.pp-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}
.pp-btn:hover {
    background: #1b5e20;
}
.pp-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Confirmation */
.pp-conferma {
    text-align: center;
    padding: 30px 20px;
    background: #e8f5e9;
    border-radius: 12px;
    border: 2px solid #4caf50;
}
.pp-conferma h3 {
    color: #2e7d32;
    border: none;
    font-size: 1.6em;
    margin-bottom: 16px;
}
#pp-riepilogo {
    text-align: left;
    max-width: 400px;
    margin: 20px auto;
    font-size: 15px;
    line-height: 1.8;
}

/* Loading & Error */
.pp-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}
.pp-errore {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
}

/* Flatpickr custom */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #ccc !important;
    background: #f5f5f5 !important;
    cursor: not-allowed !important;
    text-decoration: line-through;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
}
.flatpickr-day.today {
    border-color: #2e7d32 !important;
}
.flatpickr-day:hover {
    background: #c8e6c9 !important;
}
#pp-booking-app .flatpickr-input,
#pp-booking-app input.flatpickr-input + input.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    background-color: #fff;
    color: #333;
    cursor: pointer;
}

/* Privacy checkbox */
.pp-field-checkbox {
    margin-top: 20px;
}
.pp-field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}
.pp-field-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}
.pp-field-checkbox a {
    color: #2e7d32;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    #pp-booking-app {
        padding: 0 10px;
    }
}
