/* Base Styles */
.fpa-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

.fpa-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.fpa-form-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
}

.fpa-form-header p {
    color: #7f8c8d;
    font-size: 16px;
}

.fpa-form-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 20px;
}

.fpa-form-section h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 20px;
}

.fpa-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.fpa-form-group {
    margin-bottom: 15px;
    position: relative;
}

.fpa-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
}

/* Stili uniformi per tutti gli input */
.fpa-form-group input[type="text"],
.fpa-form-group input[type="email"],
.fpa-form-group input[type="tel"],
.fpa-form-group input[type="date"],
.fpa-form-group input[type="time"],
.fpa-form-group select {
    width: 100%;
    padding: 12px 15px;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f9f9f9;
    box-sizing: border-box;
    line-height: 24px;
}

/* Stili specifici per date/time */
.fpa-form-group input[type="date"],
.fpa-form-group input[type="time"] {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    cursor: pointer;
}



.fpa-form-group input:focus,
.fpa-form-group select:focus {
    border-color: #3498db;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Car Options */
.fpa-car-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.fpa-car-option {
    flex: 1;
    min-width: 120px;
    cursor: pointer;
}

.fpa-car-input {
    position: absolute;
    opacity: 0;
}

.fpa-car-content {
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    padding: 20px 10px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.fpa-car-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.fpa-car-label {
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 600;
    color: #7f8c8d;
}

.fpa-car-input:checked + .fpa-car-content {
    border-color: #3498db;
    background-color: #f0f7fd;
}

.fpa-car-input:checked + .fpa-car-content .fpa-car-label {
    color: #3498db;
}

/* Terms & Submit */
.fpa-form-footer {
    margin-top: 30px;
}

.fpa-terms {
    margin-bottom: 20px;
}

.fpa-terms-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.fpa-terms-label input {
    margin-right: 10px;
}

.fpa-terms-label a {
    color: #3498db;
    text-decoration: none;
}

.fpa-terms-label a:hover {
    text-decoration: underline;
}

.fpa-submit-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    position: relative;
    overflow: hidden;
    height: 48px;
    box-sizing: border-box;
}

.fpa-submit-button:hover {
    background-color: #2980b9;
}

.fpa-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fpa-submit-button.loading .fpa-submit-text {
    visibility: hidden;
}

.fpa-submit-button.loading .fpa-spinner {
    display: block;
    position: absolute;
}

/* Popup Styles */
.fpa-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.fpa-popup.active {
    visibility: visible;
    opacity: 1;
}

.fpa-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.fpa-popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 1;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.fpa-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
}

.fpa-popup-message {
    font-size: 18px;
    line-height: 1.6;
    padding: 20px 0;
}

/* Intl Tel Input adjustments */
.iti {
    width: 100%;
    height: 48px;
}

.iti__flag-container {
    padding: 0 1px;
}

.iti__selected-flag {
    height: 46px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .fpa-car-options {
        flex-direction: column;
    }
    
    .fpa-form-grid {
        grid-template-columns: 1fr;
    }
    
    .fpa-form-group input[type="date"],
    .fpa-form-group input[type="time"] {
        padding-right: 40px;
    }
}
input[type="checkbox"] {
    height: 30px !important;
}