/* Shared validation and submit feedback for authentication/account forms. */
.auth-form {
    width: 100%;
}

.auth-field {
    width: 100%;
    margin-bottom: 16px;
}

.auth-field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #6a6a6a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.auth-field .auth-input {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    outline: none;
    box-shadow: none;
    font-size: 15px;
    line-height: 40px;
    color: #333333;
    caret-color: auto;
}

.auth-field .auth-input:focus,
.auth-field .auth-input:focus-visible {
    border-color: #dddddd;
    outline: none;
    box-shadow: none;
}

.auth-field .auth-input::placeholder {
    color: #999999;
}

/* Shared password visibility control. */
.auth-password-control {
    position: relative;
    width: 100%;
    min-width: 0;
}

.auth-field .auth-input.auth-password-input {
    padding-right: 44px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #999999;
    cursor: pointer;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.auth-password-toggle:focus,
.auth-password-toggle:focus-visible {
    outline: none;
    box-shadow: none;
}

.auth-password-toggle-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-color: #999999;
    -webkit-mask: url('/images/icons/eye.svg') center / contain no-repeat;
    mask: url('/images/icons/eye.svg') center / contain no-repeat;
}

.auth-password-toggle.is-visible .auth-password-toggle-icon {
    -webkit-mask-image: url('/images/icons/eye-off.svg');
    mask-image: url('/images/icons/eye-off.svg');
}

body.dark-theme .auth-password-toggle {
    color: #9ca3af;
}

/* Match the icon itself to the real password placeholder color.
   Do not rely on currentColor here: page-wide * color rules target the inner span. */
body.dark-theme .auth-password-toggle-icon {
    background-color: #9ca3af;
}

/* Hide browser-provided reveal controls where they exist so only one eye is shown. */
.auth-password-input::-ms-reveal,
.auth-password-input::-ms-clear {
    display: none;
}

.auth-hint {
    min-height: 16px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
    color: #6a6a6a;
}

.auth-hint:empty {
    min-height: 0;
    margin-top: 0;
}

.auth-hint.is-invalid {
    color: #ef4444;
}

/* Give the submit action a little more breathing room than regular fields. */
.auth-field:last-of-type {
    margin-bottom: 18px;
}

.auth-submit-button {
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #3b82f6;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    background-color: #3b82f6;
    color: #ffffff;
    transition: none;
}

.auth-submit-button:focus,
.auth-submit-button:focus-visible {
    outline: none;
    box-shadow: none;
}

.auth-submit-button:disabled {
    background-color: #3b82f6;
    border-color: transparent;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 1;
}

.auth-submit-button:hover:not(:disabled):not(.is-success-feedback):not(.is-error-feedback) {
    background-color: #2563eb;
    border-color: #2563eb;
}

.auth-submit-button.is-success-feedback,
.auth-submit-button.is-success-feedback:disabled,
.auth-submit-button.is-success-feedback:hover,
.auth-submit-button.is-success-feedback:disabled:hover {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    opacity: 1;
    cursor: default;
}

.auth-submit-button.is-error-feedback,
.auth-submit-button.is-error-feedback:disabled,
.auth-submit-button.is-error-feedback:hover,
.auth-submit-button.is-error-feedback:disabled:hover {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    opacity: 1;
    cursor: default;
}

/* ===== RESPONSIVE PASS: prevent auth content from forcing horizontal scroll ===== */
.auth-form,
.auth-field,
.auth-field .auth-input,
.auth-submit-button {
    min-width: 0;
}

.auth-hint {
    overflow-wrap: anywhere;
}

