/* ========================================
   FORMS.CSS - Login, Registrazione, Forms
   ======================================== */

/* LOGIN */
.login-wrapper {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-wrapper h2 {
    margin-bottom: 24px;
    font-size: 22px;
    color: #333;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.login-form label {
    font-weight: 500;
    color: #444;
}

.login-form input {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 15px;
    transition: border 0.2s;
}

.login-form input:focus {
    border-color: #007bff;
    outline: none;
}

.login-password-field {
    position: relative;
    display: flex;
    align-items: stretch;
}

.login-password-field input {
    width: 100%;
    padding-right: 44px;
    box-sizing: border-box;
}

.login-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.login-password-toggle:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.08);
}

.login-password-toggle:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.login-password-toggle__icon {
    display: flex;
    line-height: 0;
}

.login-password-toggle__icon[hidden] {
    display: none !important;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.forgot-link {
    font-size: 13px;
    color: #888;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.separator {
    height: 1px;
    background-color: #eee;
    margin: 30px 0;
}

.register-text {
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.btn-secondary {
    display: inline-block;
    background-color: #f0f0f0;
    color: #333;
    padding: 10px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #e6e6e6;
}

.errore-login {
    background-color: #ffe5e5;
    color: #b10000;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.ricordami {
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* REGISTRAZIONE */
.registrazione-wrapper {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    padding: 40px 20px;
}

.blocco-info {
    flex: 1;
    min-width: 300px;
}

.blocco-info h2 {
    font-size: 28px;
    color: #0057A0;
    margin-bottom: 20px;
}

.blocco-info p,
.blocco-info ul {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.blocco-info ul {
    padding-left: 20px;
    margin-top: 16px;
}

.blocco-info li {
    margin-bottom: 6px;
}

.blocco-form {
    flex: 1;
    min-width: 300px;
}

.box-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.box-form h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #0057A0;
}

.registrazione-form input[type="text"],
.registrazione-form input[type="email"],
.registrazione-form input[type="tel"],
.registrazione-form input[type="number"],
.registrazione-form input[type="password"],
.registrazione-form input,
.registrazione-form select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    background-color: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Freccia personalizzata per select */
.registrazione-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23333' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#confermaRegistrazione {
    background: #dff0d8;
    border: 1px solid #c8e5bc;
    border-radius: 12px;
    padding: 30px;
    color: #3c763d;
    margin-top: 20px;
}

#confermaRegistrazione h3 {
    margin-bottom: 10px;
}

.btn-disabled {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background: #eee;
    color: #666;
    border-radius: 6px;
    cursor: not-allowed;
}

/* CHECKBOX STYLES */
.checkbox-group {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.checkbox-item:last-child {
    margin-bottom: 0;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    z-index: 10;
    accent-color: #0057A0;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
}

.checkbox-item input[type="checkbox"]:checked {
    accent-color: #0057A0;
    background-color: #0057A0;
}

.checkbox-item label {
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.checkbox-item label a {
    color: #2c3e50;
    text-decoration: underline;
    pointer-events: auto;
}

.checkbox-item label a:hover {
    color: #1a252f;
}

@media (max-width: 768px) {
    .registrazione-wrapper {
        flex-direction: column;
    }
}

