/* Stile Form Registrazione Theme My Login */

/* Wrapper principale form */
.tml-register {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

/* Layout a griglia per campi sulla stessa riga */
.tml-register form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Campi che occupano tutta la riga */
.tml-user_email-wrap,
.tml-user_pass-wrap,
.tml-company-wrap,
.tml-billing_address_1-wrap,
.tml-billing_state-wrap,
.tml-is_lavanderia-wrap,
.tml-submit-wrap {
    grid-column: 1 / -1;
}

/* Wrapper singolo campo */
.tml-field-wrap {
    margin-bottom: 0;
}

/* Label */
.tml-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* Input text, email */
.tml-field[type="text"],
.tml-field[type="email"],
.tml-field[type="password"],
.tml-field[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tml-field[type="text"]:focus,
.tml-field[type="email"]:focus,
.tml-field[type="password"]:focus,
.tml-field[type="tel"]:focus {
    outline: none;
    border-color: #e20b17;
    box-shadow: 0 0 0 3px rgba(226, 11, 23, 0.1);
}

/* Dropdown/Select */
.tml-field select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

select.tml-field {
    width: 100%;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tml-field select:focus,
select.tml-field:focus {
    outline: none;
    border-color: #e20b17;
    box-shadow: 0 0 0 3px rgba(226, 11, 23, 0.1);
}

/* Radio buttons personalizzati - Container */
.tml-radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.tml-radio-option {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    font-weight: 500;
}

.tml-radio-option:hover {
    border-color: #e20b17;
    background: #fff5f6;
}

.tml-radio-option input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    margin-right: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tml-radio-option input[type="radio"]:hover {
    border-color: #e20b17;
}

.tml-radio-option input[type="radio"]:checked {
    border-color: #e20b17;
    background-color: #e20b17;
}

.tml-radio-option input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tml-radio-option:has(input[type="radio"]:checked) {
    border-color: #e20b17;
    background: #ffebec;
}

.tml-radio-option span {
    font-size: 15px;
    color: #333;
}

/* Fallback per radio buttons standard */
.tml-field-wrap input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tml-field-wrap input[type="radio"]:hover {
    border-color: #e20b17;
}

.tml-field-wrap input[type="radio"]:checked {
    border-color: #e20b17;
    background-color: #e20b17;
}

.tml-field-wrap input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Container per radio buttons standard */
.tml-field-wrap label {
    display: inline-block;
    margin-right: 20px;
    font-size: 15px;
    color: #555;
    cursor: pointer;
}

/* Submit button */
.tml-submit-wrap {
    margin-top: 30px;
}

.tml-button,
input[type="submit"].tml-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #e20b17 0%, #c70912 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(226, 11, 23, 0.3);
}

.tml-button:hover,
input[type="submit"].tml-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 11, 23, 0.4);
    background: linear-gradient(135deg, #ff1a26 0%, #e20b17 100%);
}

.tml-button:active,
input[type="submit"].tml-button:active {
    transform: translateY(0);
}

/* Messaggi errore */
.tml-errors,
.tml-error {
    background: #fee;
    border-left: 4px solid #e74c3c;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #c0392b;
    font-size: 14px;
}

/* Messaggi successo */
.tml-messages,
.tml-message {
    background: #efe;
    border-left: 4px solid #27ae60;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #229954;
    font-size: 14px;
}

/* Titoli e separatori */
.tml-register h2,
.tml-register h3 {
    grid-column: 1 / -1;
    margin: 20px 0 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    font-size: 18px;
}

.tml-register h2:first-child {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tml-register {
        padding: 20px;
        max-width: 100%;
    }

    .tml-register form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tml-user_email-wrap,
    .tml-user_pass-wrap,
    .tml-company-wrap,
    .tml-billing_address_1-wrap,
    .tml-billing_state-wrap,
    .tml-is_lavanderia-wrap,
    .tml-submit-wrap {
        grid-column: 1;
    }

    .tml-field[type="text"],
    .tml-field[type="email"],
    .tml-field[type="password"],
    .tml-field[type="tel"],
    .tml-field select,
    select.tml-field {
        padding: 10px 14px;
        font-size: 14px;
    }

    .tml-button,
    input[type="submit"].tml-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .tml-radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .tml-radio-option {
        width: 100%;
    }
}

/* Placeholder styling */
.tml-field::placeholder {
    color: #999;
    opacity: 1;
}

.tml-field::-webkit-input-placeholder {
    color: #999;
}

.tml-field::-moz-placeholder {
    color: #999;
}

.tml-field:-ms-input-placeholder {
    color: #999;
}

/* Animazione fade-in per la form */
.tml-register {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus rings più visibili */
.tml-field[type="text"]:focus,
.tml-field[type="email"]:focus,
.tml-field[type="password"]:focus,
.tml-field[type="tel"]:focus,
.tml-field select:focus,
select.tml-field:focus {
    transform: translateY(-1px);
}

/* Icone per i campi (opzionale) */
.tml-field-wrap {
    position: relative;
}

/* Miglioramento accessibilità */
.tml-field:required {
    border-left: 3px solid #e20b17;
}

/* Link e testo extra */
.tml-register a {
    color: #e20b17;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tml-register a:hover {
    color: #c70912;
    text-decoration: underline;
}

/* Privacy e termini */
.tml-register p {
    grid-column: 1 / -1;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}
