/* pages/reset_pass.php - the "choose a new password" form.
   The card and inputs use the page's Tailwind classes; this file adds the
   show/hide button, the read-only account field and the live rule list. */

/* Tailwind's space-y-* is not in the prebuilt tw.css, so the form spaces its
   own rows. */
.rp-form > * + * {
    margin-top: 1.1rem;
}

.rp-field {
    position: relative;
}

.rp-field input[type="password"],
.rp-field input[type="text"] {
    padding-right: 4.25rem;
}

.rp-eye {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    border: 0;
    background: none;
    color: var(--bmm-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.rp-eye:focus-visible {
    outline: 2px solid var(--bmm-accent);
    outline-offset: 1px;
    border-radius: 2px;
}

.rp-readonly {
    background: #f3f4f6;
    color: #4b5563;
    cursor: default;
}

.rp-rules {
    margin-bottom: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #6b7280;
}

.rp-rules li {
    position: relative;
    padding-left: 1.6rem;
}

.rp-rules li + li {
    margin-top: 0.3rem;
}

/* The box in front of each rule. It fills with the accent colour and shows a
   tick once the typed password meets the rule. */
.rp-rules li::before {
    content: '';
    position: absolute;
    top: 0.2em;
    left: 0;
    box-sizing: border-box;
    width: 1.05rem;
    height: 1.05rem;
    border: 1.5px solid #d1d5db;
    border-radius: 2px;
    background: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.rp-rules li.is-ok {
    color: #111827;
}

.rp-rules li.is-ok::before {
    border-color: var(--bmm-accent);
    background-color: var(--bmm-accent);
}

.rp-rules li.is-ok::after {
    content: '';
    position: absolute;
    top: 0.36em;
    left: 0.36rem;
    width: 0.32rem;
    height: 0.58rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#rp-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    .rp-rules li::before {
        transition: none;
    }
}
