/* password-toggle.css
 * PURPOSE: Layout for password fields with a Show/Hide button to the RIGHT of the field.
 * USED BY: htdocs/assets/js/password-toggle.js on login and profile/billing pages.
 */

.rw-password-wrap {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
}

.rw-password-wrap > input.form-control,
.rw-password-wrap > input[type="password"],
.rw-password-wrap > input[type="text"] {
    /* Field keeps normal padding; button sits outside to the right. */
    padding-right: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.rw-password-toggle {
    position: static;
    flex: 0 0 auto;
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0.35rem;
    background: #f3f4f6;
    color: #1f2937;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    height: calc(1.5em + 0.75rem + 2px);
    /* Match Bootstrap form-control height when possible. */
    box-sizing: border-box;
}

.rw-password-toggle:hover,
.rw-password-toggle:focus {
    background: #e5e7eb;
    outline: none;
}

.rw-password-toggle:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.55);
}

/* Dark / maroon login card: keep the toggle readable on dark backgrounds. */
.rw-password-wrap.rw-password-wrap-dark .rw-password-toggle {
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    border-color: rgba(0, 0, 0, 0.25);
}

.rw-password-wrap.rw-password-wrap-dark .rw-password-toggle:hover,
.rw-password-wrap.rw-password-wrap-dark .rw-password-toggle:focus {
    background: #ffffff;
}

/* Login form centers a fixed-width stack; keep wrap centered when parent is flex-column. */
.rw-password-wrap.rw-password-wrap-login {
    width: 100%;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}
