/* Stili personalizzati per la pagina di prenotazione */

/* Import Magistral font */
@font-face {
    font-family: 'Magistral';
    src: url('../font/Magistral Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Magistral Bold';
    src: url('../font/Magistral Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* Background section */
.booking-form-section {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Global font application */
.contact-form-style-02,
.contact-form-style-02 * {
    font-family: 'Magistral', sans-serif !important;
}

/* Beautiful form inputs */
.beautiful-input, .beautiful-select, .beautiful-textarea {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 16px;
    font-family: 'Magistral', sans-serif !important;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #333;
    width: 100%;
}

.beautiful-input:focus, .beautiful-select:focus, .beautiful-textarea:focus {
    border-color: #2196F3;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.15);
    outline: none;
    transform: translateY(-2px);
}

.beautiful-input::placeholder, .beautiful-textarea::placeholder {
    color: #666;
    font-family: 'Magistral', sans-serif;
    font-weight: 600;
    opacity: 1;
}

/* Error states */
.beautiful-input.border-color-red, 
.beautiful-select.border-color-red, 
.beautiful-textarea.border-color-red {
    border-color: #f44336;
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.15);
}

.error-message {
    color: #f44336;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    font-family: 'Magistral', sans-serif;
}

/* Beautiful select dropdown */
.beautiful-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232196F3'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 24px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 50px;
    font-family: 'Magistral', sans-serif !important;
    font-weight: 600 !important;
    color: #333;
}

.beautiful-select option {
    font-family: 'Magistral', sans-serif !important;
    font-size: 15px;
    padding: 8px;
    color: #333;
    background: white;
}

.beautiful-select option:first-child {
    color: #666;
    font-style: italic;
    font-weight: 600;
}

/* Time picker styling */
.time-picker {
    cursor: pointer;
    font-family: 'Magistral', sans-serif !important;
    font-size: 16px;
    color: #333;
    letter-spacing: 0.5px;
}

.time-picker::-webkit-calendar-picker-indicator {
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232196F3'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z'/%3E%3C/svg%3E");
    background-size: 22px;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    margin-left: 10px;
    width: 22px;
    height: 22px;
}

.time-picker:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
    transform: scale(1.1);
}

.time-picker:focus::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Specifici stili per il time input */
.time-picker::-webkit-datetime-edit-fields-wrapper {
    font-family: 'Magistral', sans-serif;
    font-size: 16px;
    padding: 0;
}

.time-picker::-webkit-datetime-edit-hour-field,
.time-picker::-webkit-datetime-edit-minute-field {
    font-family: 'Magistral', sans-serif;
    font-weight: 500;
    color: #333;
    padding: 2px 4px;
    border-radius: 4px;
    background: transparent;
}

.time-picker::-webkit-datetime-edit-text {
    font-family: 'Magistral', sans-serif;
    color: #666;
    padding: 0 2px;
}

/* Radio button styles - Stile semplice */
.form-check-style-02 {
    position: relative;
    padding-left: 0;
}

.form-check-style-02 .form-check-input {
    margin-right: 10px;
    transform: scale(1.2);
}

.form-check-style-02 .form-check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
    font-family: 'Magistral', sans-serif !important;
    font-weight: 400;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
}

.form-check-style-02 .form-check-label:hover {
    color: #2196F3;
}

.form-check-style-02 .form-check-input:checked + .form-check-label {
    color: #2196F3;
    font-weight: 500;
}

/* Beautiful submit button */
.beautiful-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 12px;
    padding: 18px 35px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Magistral', sans-serif !important;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    min-width: 280px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
}

.beautiful-button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    color: white;
    text-decoration: none;
}

.beautiful-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.beautiful-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.beautiful-button .button-icon {
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.beautiful-button:hover .button-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

/* Disclaimer box */
.disclaimer-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #fdcb6e;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(253, 203, 110, 0.2);
    padding: 20px !important;
}

.disclaimer-box p {
    font-family: 'Magistral', sans-serif !important;
    font-size: 15px !important;
    color: #856404 !important;
    margin: 0 !important;
    line-height: 1.6;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.disclaimer-box strong {
    font-family: 'Magistral', sans-serif !important;
    font-weight: 700;
    color: #6c5400 !important;
}

.disclaimer-box i {
    font-size: 18px;
    color: #fdcb6e;
}

/* Background opacity */
.bg-opacity-95 {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* Success page styles */
.bg-light-gray {
    background-color: #f8f9fa;
}

.bg-light-red {
    background-color: #f8d7da;
}

.text-red {
    color: #dc3545;
}

/* Responsive improvements */
@media (max-width: 767px) {
    .form-check-style-02 .form-check-label {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .form-check-style-02 .form-check-label::before {
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
    
    .form-check-style-02 .form-check-input:checked + .form-check-label::after {
        left: 23px;
        width: 6px;
        height: 6px;
    }
}

/* Loading state for form submission */
.contact-form-style-02 button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Disclaimer box */
.disclaimer-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--base-color, #007bff);
}

/* Form field focus effects */
.contact-form-style-02 .form-control:focus,
.contact-form-style-02 select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

/* Select dropdown improvements */
.contact-form-style-02 select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23666' d='m2 0-2 2h4zm0 5 2-2h-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.contact-form-style-02 select:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23007bff' d='m2 0-2 2h4zm0 5 2-2h-4z'/%3E%3C/svg%3E");
}

/* Success animation */
.success-icon {
    animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Phone input formatting */
.contact-form-style-02 input[type="tel"] {
    letter-spacing: 0.5px;
}

/* Date input improvements */
.beautiful-input[type="date"] {
    cursor: pointer;
}

.beautiful-input[type="date"]::-webkit-calendar-picker-indicator {
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232196F3'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z'/%3E%3C/svg%3E");
    background-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.beautiful-input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Labels bold */
label, .form-label {
    font-family: 'Magistral', sans-serif !important;
    font-weight: 700 !important;
    color: #333 !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
    display: block;
}

small, .text-muted {
    font-family: 'Magistral', sans-serif !important;
    font-size: 13px !important;
    color: #666 !important;
    margin-top: 5px;
}

/* Input con font regular/medium */
.contact-form-style-02 input,
.contact-form-style-02 select,
.contact-form-style-02 textarea,
.form-control {
    font-family: 'Magistral', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
}

/* Solo i titoli Bold, il resto normale */
.contact-form-style-02 h1,
.contact-form-style-02 h2,
.contact-form-style-02 h3,
.booking-form-section h1 {
    font-family: 'Magistral', sans-serif !important;
    font-weight: 700 !important;
}

.contact-form-style-02 p,
.booking-form-section p {
    font-family: 'Magistral', sans-serif !important;
    font-weight: 400 !important;
}

/* Opzioni select */
.contact-form-style-02 option {
    font-family: 'Magistral', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Enhanced animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.beautiful-input, .beautiful-select, .beautiful-textarea, .form-check-style-02 {
    animation: fadeInUp 0.6s ease-out;
}

/* Form container improvements */
.contact-form-style-02 {
    font-family: 'Magistral', sans-serif !important;
}

/* Placeholder regular */
.beautiful-input::placeholder,
.beautiful-textarea::placeholder {
    font-family: 'Magistral', sans-serif !important;
    color: #666 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

.beautiful-select option:first-child {
    font-family: 'Magistral', sans-serif !important;
    color: #666 !important;
    font-style: italic;
    font-weight: 600 !important;
}

/* Info messages */
.info-message {
    font-family: 'Magistral', sans-serif !important;
    font-size: 13px;
    margin-top: 5px;
    padding: 5px 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .booking-form-section {
        background-attachment: scroll;
        padding: 30px 0;
        padding-top: 120px; /* Aggiunge margine superiore per evitare sovrapposizione con l'header */
    }
    
    .beautiful-button {
        width: 100%;
        min-width: auto;
        font-size: 16px;
        padding: 16px 25px;
        font-family: 'Magistral', sans-serif !important;
    }
    
    .beautiful-input, .beautiful-select, .beautiful-textarea {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        font-family: 'Magistral', sans-serif !important;
    }
    
    .form-check-style-02 .form-check-label {
        padding: 15px 20px;
        font-size: 15px;
        font-family: 'Magistral', sans-serif !important;
    }
    
    h1 {
        font-size: 2.2rem !important;
        font-family: 'Magistral', sans-serif !important;
    }
    
    label, .form-label {
        font-size: 14px !important;
    }
}

/* Loading state */
.beautiful-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.beautiful-button:disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

/* Location buttons styling */
.location-buttons-container {
    margin-top: 10px;
}

.location-button {
    width: 100%;
    padding: 20px 20px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #e8f4f8;
    border-radius: 12px;
    font-family: 'Magistral', sans-serif !important;
    font-size: 17px !important;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    text-align: center;
}

.location-button:hover {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
    color: #007bff;
}

.location-button.active {
    background: linear-gradient(145deg, #007bff, #0056b3);
    border-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.location-button.active:hover {
    background: linear-gradient(145deg, #0056b3, #004085);
    color: white;
}

.location-button i {
    font-size: 20px;
}

.location-button span {
    font-family: 'Magistral', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px;
    text-align: center;
    display: block;
}

/* Ulteriori miglioramenti per i campi del form */
.contact-form-style-02 .beautiful-input,
.contact-form-style-02 .beautiful-select,
.contact-form-style-02 .beautiful-textarea {
    background: #ffffff;
    border: 2px solid #e8f4f8;
    border-radius: 10px;
    padding: 16px 20px;
    font-family: 'Magistral', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin-bottom: 5px;
}

.contact-form-style-02 .beautiful-input:focus,
.contact-form-style-02 .beautiful-select:focus,
.contact-form-style-02 .beautiful-textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background: #ffffff;
    outline: none;
}

/* Miglioramento pulsante per mobile */
@media (max-width: 768px) {
    .beautiful-button {
        width: 100% !important;
        min-width: auto !important;
        padding: 18px 25px !important;
        font-size: 16px !important;
        font-family: 'Magistral', sans-serif !important;
    }
    
    .location-button {
        padding: 16px 18px !important;
        font-size: 15px !important;
        margin-bottom: 10px;
    }
    
    .location-button i {
        font-size: 18px !important;
    }
    
    .disclaimer-box p {
        font-size: 14px !important;
        line-height: 1.5;
        flex-direction: column;
        gap: 5px !important;
    }
    
    .disclaimer-box {
        padding: 15px !important;
    }
}

/* Ulteriore margine per dispositivi molto piccoli */
@media (max-width: 575px) {
    .booking-form-section {
        padding-top: 110px !important; /* Margine maggiore per schermi molto piccoli */
    }
}

/* Stili per le pagine di conferma prenotazione (successo e errore) */
.success-page-section, .error-page-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Mobile responsiveness per pagine di conferma */
@media (max-width: 768px) {
    .success-page-section, .error-page-section {
        padding-top: 100px; /* Aggiunge margine superiore per evitare sovrapposizione con l'header */
        min-height: calc(100vh - 100px);
        background-attachment: scroll; /* Migliore performance su mobile */
    }
    
    /* Miglioramento separazione pulsanti su mobile */
    .button-row .col-md-6 {
        margin-bottom: 15px;
    }
    
    .button-row .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .button-row .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 575px) {
    .success-page-section, .error-page-section {
        padding-top: 110px !important; /* Margine maggiore per schermi molto piccoli */
        min-height: calc(100vh - 110px);
    }
}

/* Miglioramento generale separazione pulsanti */
.button-row {
    gap: 15px;
}

.button-row .btn {
    transition: all 0.3s ease;
    font-family: 'Magistral', sans-serif !important;
}

.button-row .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}