/* === Main Container === */
.auth-container {
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    direction: ltr;
}

[dir="rtl"] .auth-container {
    direction: rtl;
    text-align: right;
}

/* === Header === */
.auth-container h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
    color: #333;
}

/* === Form Grouping === */
fieldset {
    border: none;
    margin-bottom: 20px;
}

legend {
    font-weight: bold;
    margin-bottom: 10px;
}

label {
    display: block;
    margin: 8px 0 4px;
}

/* === Inputs & Selects === */
input,
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
}

input.valid {
    border: 2px solid #4CAF50;
    background-color: #f6fff6;
}

input.invalid,
select.invalid {
    border: 2px solid #f44336;
    background-color: #fff6f6;
}

/* === CAPTCHA Block === */
.tcn-captcha-img {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    max-width: 100%;
}

.auth-container .tcn-captcha p {
    margin-bottom: 10px;
    text-align: center;
}

/* === Password + Terms Checkboxes === */
.tcn-show-password,
.tcn-agree {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    margin-bottom: 15px;
}

label.invalid {
    border: 1px solid #f44336;
    background-color: #fff6f6;
    padding: 8px;
    border-radius: 4px;
}
label.invalid:hover {
    background-color: #ffe6e6;
}

/* === Error Messages === */
.error {
    color: red;
    text-align: center;
    margin-bottom: 15px;
}

.error-msg {
    color: #f44336;
    font-size: 0.85em;
    margin: -10px 0 10px;
}

.global-error {
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.hint {
    font-size: 0.85em;
    color: #666;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* === Submit Button === */
button {
    width: 100%;
    padding: 14px;
    background-color: #4CAF50;
    color: white;
    font-size: 1.1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

/* === Login Link === */
.tcn-login-link {
    text-align: center;
    margin-top: 15px;
}

.auth-container p a {
    color: #0073aa;
    text-decoration: none;
}

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

/* === Responsive === */
@media (max-width: 480px) {
    .auth-container {
        padding: 15px;
    }
}
