/**
 * EAG Password UX — show/hide toggle + strength meter.
 * Single file; RTL handled via body.rtl.
 */

.eag-pw-wrap {
    position: relative;
    display: block;
}
.eag-pw-wrap input[type="password"],
.eag-pw-wrap input[type="text"] {
    width: 100%;
    padding-right: 44px;
    box-sizing: border-box;
}
body.rtl .eag-pw-wrap input[type="password"],
body.rtl .eag-pw-wrap input[type="text"] {
    padding-right: 14px;
    padding-left: 44px;
}

.eag-pw-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
}
body.rtl .eag-pw-toggle { right: auto; left: 6px; }
.eag-pw-toggle:hover { color: #1d2327; background: rgba(0, 0, 0, .05); }
.eag-pw-toggle:focus-visible { outline: 2px solid #2271b1; outline-offset: 1px; }

/* Strength meter */
.eag-pw-meter {
    margin: 8px 0 0;
}
.eag-pw-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}
.eag-pw-seg {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: #e0e0e2;
    transition: background-color .2s ease;
}
.eag-pw-label {
    font-size: 12px;
    color: #646970;
    font-weight: 500;
}

/* Levels: colour the label + the first N segments. */
.eag-pw-level-1 .eag-pw-seg:nth-child(-n+1) { background: #d63638; }
.eag-pw-level-1 .eag-pw-label { color: #b32d2e; }
.eag-pw-level-2 .eag-pw-seg:nth-child(-n+2) { background: #dba617; }
.eag-pw-level-2 .eag-pw-label { color: #8a6700; }
.eag-pw-level-3 .eag-pw-seg:nth-child(-n+3) { background: #2271b1; }
.eag-pw-level-3 .eag-pw-label { color: #1d6fbb; }
.eag-pw-level-4 .eag-pw-seg { background: #00a32a; }
.eag-pw-level-4 .eag-pw-label { color: #00712a; }
