/* === STILI COMUNI PER FORM === */

/* Form container base */
.form-container,
.user-profile-form {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0rem;
    background: #fff;
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* Base form */
.base-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    background: #fff;
    box-sizing: border-box;
    border: none;
    box-shadow: none;
}

/* Layout a colonne per form */
.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Form group base */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    font-size: 1.1rem;
}

/* Base label */
.base-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
    font-family: sans-serif;
}

/* Input fields comuni */
.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
.form-container select,
.user-profile-form select,
.base-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    appearance: none;
    box-shadow: none;
    margin-bottom: 0;
    justify-content: center;
}

/* Base select */
.base-select:not([multiple]) {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 16px;
    background: #fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>') no-repeat right 12px center;
    background-size: 12px;
    box-sizing: border-box;
    appearance: none;
    box-shadow: none;
    margin-bottom: 0;
    justify-content: center;
    font-family: sans-serif;
    padding-right: 40px;
}

.base-select[multiple] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    appearance: none;
    box-shadow: none;
    margin-bottom: 0;
    justify-content: center;
    font-family: sans-serif;
}

/* Textarea specifico */
textarea {
    min-height: 100px;
    resize: vertical;
}

/* Select multiplo */
select[multiple] {
    min-height: 120px;
    padding: 8px;
}

select[multiple] option {
    padding: 5px 8px;
    margin: 1px 0;
}

select[multiple] option:checked {
    background-color: #007cba;
    color: white;
}

/* Bottoni primari */
.btn-primary,
.form-submit,
button[type="submit"],
input[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    font-family: sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    box-shadow: none;
    line-height: 1;
    height: 48px;
}

.btn-primary:hover,
.form-submit:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

/* Bottoni secondari */
.btn-secondary {
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    font-family: sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    box-shadow: none;
    line-height: 1;
    height: 48px;
}

.btn-secondary:hover {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

/* Bottoni terziari */
.btn-tertiary {
    background: #d42f74;
    border: 1px solid #d42f74;
    color: #fff;
    padding: 0;
    border-radius: 4px;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    height: 48px;
    box-sizing: border-box;
    margin: 0;
    text-align: center;
    flex: 1;
    min-width: 200px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
}

.btn-tertiary:hover {
    background: #d42f74;
    border: 1px solid #d42f74;
    color: #fff;
}

/* Bottoni outline */
.btn-outline {
    background: transparent;
    border: 1px solid #666;
    color: #666;
    border-radius: 0;
    box-shadow: none;
}

.btn-outline:hover {
    background: #666;
    color: #fff;
}

/* Bottoni di dimensioni diverse */
.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    padding: 18px 24px;
    font-size: 18px;
}

/* Bottoni inline (non full width) */
.btn-inline {
    width: auto;
    display: inline-block;
}

/* Form errors */
.form-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.form-input.error,
input.error,
select.error,
textarea.error {
    border-color: #dc3545;
}

/* Form success */
.form-success {
    color: #28a745;
    font-size: 14px;
    margin-top: 5px;
}

/* Helper text */
.form-help,
.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Checkbox e radio */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

.checkbox-group,
.radio-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-container,
    .user-profile-form {
        margin: 0rem;
        padding: 0rem;
    }
    
    .form-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .form-submit {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* === FORM ACTIONS STYLES === */
.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

/* Mobile responsive - buttons in column */
@media (max-width: 768px) {
    .form-actions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

