/* CSS PULITO E MODERNO - CAMPI VERTICALI CON PRIVACY */

.piero-booking-wrapper {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
}

/* Steps */
.piero-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    position: relative;
}

.step.active {
    color: #495057;
    font-weight: 600;
}

.step.active::after {
    content: '';
    position: absolute;
    bottom: -21px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: #28a745;
}

/* Form */
.piero-step-content {
    display: none;
    min-height: 300px;
}

.piero-step-content.active {
    display: block;
}

.piero-step-content h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 600;
    color: #212529;
}

/* Form fields - TUTTO VERTICALE */
.piero-field {
    margin-bottom: 20px;
}

.piero-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.piero-field input,
.piero-field select,
.piero-field textarea {
    width: 100%;
    padding: 5px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.piero-field input:focus,
.piero-field select:focus,
.piero-field textarea:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.piero-field input::placeholder,
.piero-field textarea::placeholder {
    color: #9ca3af;
}

/* Checkbox Privacy */
.piero-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
}

.piero-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
    padding: 0 !important;
}

.piero-checkbox-label a {
    color: #28a745;
    text-decoration: none;
}

.piero-checkbox-label a:hover {
    text-decoration: underline;
}

/* Rimuovi i grid - TUTTO VERTICALE */
.piero-fields-row,
.piero-fields-grid {
    display: block;
}

/* Time slots */
.piero-time-section h4 {
    margin: 20px 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.piero-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.piero-time-slot {
    position: relative;
    cursor: pointer;
}

.piero-time-slot input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.piero-time-slot .time-display {
    display: block;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    background: #fff;
}

.piero-time-slot:hover .time-display {
    border-color: #28a745;
    background: #f8f9fa;
}

.piero-time-slot input:checked + .time-display {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* Summary */
.piero-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.piero-summary h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.summary-grid div {
    font-size: 14px;
    color: #6c757d;
}

.summary-grid strong {
    color: #495057;
}

/* Navigation */
.piero-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Buttons */
.piero-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.piero-btn-next,
.piero-btn-submit {
    background: #28a745;
    color: white;
}

.piero-btn-next:hover:not(:disabled),
.piero-btn-submit:hover:not(:disabled) {
    background: #1e7e34;
    transform: translateY(-1px);
}

.piero-btn-prev {
    background: #6c757d;
    color: white;
}

.piero-btn-prev:hover {
    background: #545b62;
}

.piero-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Messages */
.piero-message {
    margin: 20px 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.piero-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.piero-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Success */
.piero-success {
    text-align: center;
    padding: 40px;
}

.piero-success h2 {
    color: #28a745;
    margin: 0 0 15px 0;
    font-size: 24px;
}

.piero-success p {
    margin: 10px 0;
    color: #6c757d;
}

/* Loading */
.piero-loading {
    text-align: center;
    padding: 40px;
}

.piero-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Firma - Piccolina e grigia in basso a destra */
.piero-signature {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 9px;
    color: #adb5bd;
    opacity: 0.7;
    font-weight: 400;
}

/* Disabled message */
.piero-booking-disabled {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    text-align: center;
    color: #6c757d;
    position: relative;
}

.piero-booking-disabled .piero-signature {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 9px;
    color: #adb5bd;
    opacity: 0.7;
    font-weight: 400;
}

/* Mobile */
@media (max-width: 768px) {
    .piero-booking-wrapper {
        margin: 15px;
        padding: 20px;
        max-width: none;
    }
    
    .piero-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .piero-btn {
        width: 100%;
        text-align: center;
    }
}