/* CSS per la pagina di registrazione Italfrigo */

/* Sezione principale */
.auth-section {
    min-height: 100vh;
    padding: 120px 0 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.auth-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.auth-header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.auth-header p {
    font-size: 1.1em;
    margin: 0;
    opacity: 0.9;
}

/* Form */
.auth-form {
    padding: 30px;
}

.form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid #2c5530;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #2c5530;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3 i {
    color: #3d7c47;
}

/* Account Type Selection */
.account-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.account-type-option {
    position: relative;
}

.account-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    accent-color: #28a745;
}

.account-type-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.account-type-label i {
    font-size: 2em;
    margin-bottom: 10px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.account-type-label span {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}

.account-type-label small {
    color: #6c757d;
    font-size: 0.9em;
}

.account-type-option input[type="radio"]:checked + .account-type-label {
    border-color: #28a745;
    background: #f8fff8;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.account-type-option input[type="radio"]:checked + .account-type-label i {
    color: #28a745;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

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

.required-field {
    color: #dc3545;
    font-weight: bold;
}

.form-help-text {
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* Input styles */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: #6c757d;
    z-index: 2;
    transition: color 0.3s ease;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

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

.form-group input:focus + i,
.input-with-icon input:focus ~ i {
    color: #28a745;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    font-size: 1em;
    z-index: 10;
}

.password-toggle:hover {
    color: #28a745;
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background: linear-gradient(to right, #dc3545 0%, #dc3545 33%, #e9ecef 33%);
}

.password-strength.medium {
    background: linear-gradient(to right, #ffc107 0%, #ffc107 66%, #e9ecef 66%);
}

.password-strength.strong {
    background: linear-gradient(to right, #28a745 0%, #28a745 100%);
}

/* Form rows */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group.half {
    flex: 1;
}

.form-group.quarter {
    flex: 0 0 calc(25% - 11.25px);
}

/* Checkbox groups */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
    accent-color: #28a745;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-group a {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-group a:hover {
    color: #218838;
    text-decoration: underline;
}

/* Sezione/* Form sections */
.form-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border-left: 4px solid #28a745;
}

.form-section h3 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3 i {
    color: #28a745;
    font-size: 1.1em;
}

.consent-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-bottom: 25px;
}

.consent-section h3 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.consent-item:hover {
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.consent-item input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    transform: scale(1.3);
    accent-color: #28a745;
}

.consent-item label {
    font-size: 0.9em;
    line-height: 1.5;
    cursor: pointer;
    flex: 1;
}

.consent-item.required {
    border-color: #28a745;
    background: #f8fff9;
}

.consent-item.required label {
    font-weight: 500;
    color: #155724;
}

.consent-item a {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
}

.consent-item a:hover {
    text-decoration: underline;
}

/* Country specific fields */
.country-specific-fields {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.country-specific-fields .form-group {
    margin-bottom: 15px;
}

.country-specific-fields h4 {
    color: #2c5530;
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dynamic field styling */
.dynamic-field-label {
    transition: all 0.3s ease;
}

.field-validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.field-validation-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}

.submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.submit-btn i {
    font-size: 1.2em;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Login link section */
.login-link {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

.login-link p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95em;
}

.login-link a {
    color: #28a745;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-link a:hover {
    color: #218838;
    text-decoration: underline;
}

/* Auth footer */
.auth-footer {
    text-align: center;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.auth-footer a {
    color: #2c5530;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert messages */
#alert-container {
    margin: 0 30px 20px 30px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

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

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

.alert.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert i {
    font-size: 1.1em;
}

/* Responsive design */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        border-radius: 10px;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .account-type-selection {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half,
    .form-group.quarter {
        flex: none;
    }
    
    .auth-header h1 {
        font-size: 1.8em;
    }
    
    #alert-container {
        margin: 0 20px 15px 20px;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 20px 0;
    }
    
    .auth-container {
        margin: 10px;
    }
    
    .auth-header {
        padding: 20px;
    }
    
    .auth-form {
        padding: 15px;
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .account-type-label {
        padding: 15px;
    }
    
    .account-type-label i {
        font-size: 1.5em;
    }
}
