/* Preventivi Fotovoltaico - Frontend Styles */

.preventivi-fv-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preventivi-fv-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.preventivi-fv-description {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.preventivi-fv-notice {
    background: #e8f4fd;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.preventivi-fv-notice p {
    margin: 0;
    color: #0d47a1;
    font-size: 14px;
}

.preventivi-fv-form {
    margin-top: 30px;
}

.preventivi-fv-field {
    margin-bottom: 25px;
}

/* Field Row for two columns layout */
.preventivi-fv-field-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.preventivi-fv-field-half {
    flex: 1;
    margin-bottom: 0;
}

/* Mobile: single column */
@media (max-width: 768px) {
    .preventivi-fv-field-row {
        flex-direction: column;
        gap: 0;
    }
    
    .preventivi-fv-field-half {
        margin-bottom: 25px;
    }
}

.preventivi-fv-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.preventivi-fv-field .required {
    color: #e74c3c;
    font-weight: 700;
}

.preventivi-fv-field select,
.preventivi-fv-field input[type="text"],
.preventivi-fv-field input[type="email"],
.preventivi-fv-field input[type="tel"],
.preventivi-fv-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.preventivi-fv-field select:focus,
.preventivi-fv-field input[type="text"]:focus,
.preventivi-fv-field input[type="email"]:focus,
.preventivi-fv-field input[type="tel"]:focus,
.preventivi-fv-field textarea:focus {
    outline: none;
    border-color: #2196F3;
}

.preventivi-fv-field select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.preventivi-fv-field textarea {
    min-height: 120px;
    resize: vertical;
}

/* Radio buttons */
.preventivi-fv-radio {
    margin-bottom: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.preventivi-fv-radio:hover {
    background: #f0f0f0;
}

.preventivi-fv-radio input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    cursor: pointer;
}

.preventivi-fv-radio label {
    display: inline;
    font-weight: 400;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
}

/* Privacy checkbox */
.preventivi-fv-privacy {
    margin-top: 30px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
}

.preventivi-fv-privacy input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
    cursor: pointer;
}

.preventivi-fv-privacy label {
    display: inline;
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    vertical-align: middle;
}

.preventivi-fv-privacy a {
    color: #0066cc;
    text-decoration: underline;
}

.preventivi-fv-privacy a:hover {
    color: #004499;
}

/* Submit button */
.preventivi-fv-submit {
    width: 100%;
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preventivi-fv-submit:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.preventivi-fv-submit:active {
    transform: translateY(0);
}

.preventivi-fv-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.preventivi-fv-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
}

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

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

/* Loading state */
.preventivi-fv-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.preventivi-fv-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: preventivi-fv-spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .preventivi-fv-wrapper {
        padding: 20px;
        margin: 20px auto;
    }
    
    .preventivi-fv-title {
        font-size: 24px;
    }
    
    .preventivi-fv-description {
        font-size: 14px;
    }
    
    .preventivi-fv-submit {
        font-size: 16px;
        padding: 12px 24px;
    }
}
