/* Booking Form Plugin - Frontend Styles */

.bfp-booking-form {
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Larghezze del form */
.bfp-width-centered {
    max-width: 600px;
}

.bfp-width-wide {
    max-width: 800px;
}

.bfp-width-full {
    max-width: 100%;
    width: 100%;
}

.bfp-booking-form h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.bfp-form-fields {
    margin-bottom: 20px;
}

.bfp-field-group {
    margin-bottom: 20px;
}

.bfp-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.bfp-field-group label .required {
    color: #dc3232;
    font-weight: bold;
}

.bfp-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.bfp-field:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bfp-field.bfp-error-field {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.bfp-field-error {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Stili specifici per tipo di campo */
.bfp-textarea {
    resize: vertical;
    min-height: 100px;
}

.bfp-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 35px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.bfp-date {
    position: relative;
}

.bfp-date::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Pulsante di invio */
.bfp-form-submit {
    text-align: center;
    margin-top: 30px;
}

.bfp-submit-btn {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
    min-width: 200px;
}

.bfp-submit-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

.bfp-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 115, 170, 0.3);
}

.bfp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messaggi di feedback */
.bfp-messages {
    margin-top: 20px;
}

.bfp-success,
.bfp-error {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}

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

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

/* Layout orizzontale per desktop */
.bfp-horizontal-layout .bfp-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.bfp-horizontal-layout .bfp-field-group {
    flex: 1;
    margin-bottom: 0;
}

/* Larghezze dei campi */
.bfp-field-width-full .bfp-field {
    width: 100%;
}

.bfp-field-width-medium .bfp-field {
    width: 100%;
    max-width: 300px;
}

.bfp-field-width-small .bfp-field {
    width: 100%;
    max-width: 200px;
}

/* Responsive design */
@media (max-width: 768px) {
    .bfp-booking-form {
        margin: 10px;
        padding: 15px;
    }
    
    .bfp-booking-form h3 {
        font-size: 20px;
    }
    
    .bfp-field {
        padding: 10px;
        font-size: 16px; /* Previene zoom su iOS */
    }
    
    .bfp-submit-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    /* Su mobile, sempre layout verticale */
    .bfp-horizontal-layout .bfp-row {
        display: block;
        gap: 0;
    }
    
    .bfp-horizontal-layout .bfp-field-group {
        margin-bottom: 20px;
    }
    
    .bfp-field-width-medium .bfp-field,
    .bfp-field-width-small .bfp-field {
        max-width: 100%;
    }
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bfp-booking-form {
    animation: fadeIn 0.5s ease-out;
}

/* Stili per stati di caricamento */
.bfp-loading {
    position: relative;
    pointer-events: none;
}

.bfp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Miglioramenti per accessibilità */
.bfp-field:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Stili per campi con placeholder */
.bfp-field::placeholder {
    color: #999;
    opacity: 1;
}

/* Stili per campi numerici */
.bfp-number::-webkit-outer-spin-button,
.bfp-number::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bfp-number {
    -moz-appearance: textfield;
} 

.bfp-booking-form.bfp-no-title {
    margin-top: 0 !important;
    border-top: none !important;
}

.bfp-booking-form.bfp-no-title h3 {
    display: none !important;
} 