/**
 * Live password requirement checklist
 *
 * Styles the panel rendered by HT_Password_Helper::render_requirements_list()
 * and driven by public/assets/js/password-requirements.js. Every rule row is
 * painted from the same rule set the server enforces in
 * HT_Password_Helper::validate_password(), so a row turning green means the
 * server will accept that rule.
 *
 * The panel is placed in the right-hand column of a UIkit grid next to the
 * password fields and stacks underneath them below the @m breakpoint.
 *
 * @package    Hiring_Tracker
 * @subpackage Hiring_Tracker/public/assets/css
 * @since      1.0.0
 */

.ht-password-requirements {
    /* Both label colours are darkened well past their UIkit equivalents so 14px
       text clears WCAG AA (4.5:1) on this panel: #12805f is ~5.6:1 and #6b6b73
       is ~5.2:1 against #fbfaff. UIkit's own #32d296 would be 1.9:1. */
    --ht-pr-met: #12805f;
    --ht-pr-met-icon: #1c9c74;
    --ht-pr-idle: #6b6b73;
    --ht-pr-title: #1d1d1f;

    box-sizing: border-box;
    padding: 18px 20px;
    border: 1px solid rgba(169, 131, 229, 0.22);
    border-radius: 14px;
    background: #fbfaff;
    box-shadow: inset 0 0 10px 1px rgba(169, 131, 229, 0.05);
}

.ht-password-requirements__title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ht-pr-title);
}

.ht-pr-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ht-pr-item {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ht-pr-idle);
    transition: color 0.18s ease;
}

.ht-pr-item + .ht-pr-item {
    margin-top: 9px;
}

/* Met state: the colour change and the icon swap both carry the meaning, so
   the checklist still reads correctly without colour perception. */
.ht-pr-item.ht-pr-met {
    color: var(--ht-pr-met);
}

.ht-pr-marker {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-right: 9px;
    /* Nudge the marker onto the first line's optical centre. */
    margin-top: 2px;
}

.ht-pr-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.ht-pr-icon-idle {
    opacity: 1;
    transform: none;
}

.ht-pr-icon-met {
    color: var(--ht-pr-met-icon);
    opacity: 0;
    transform: scale(0.55);
}

.ht-pr-item.ht-pr-met .ht-pr-icon-idle {
    opacity: 0;
    transform: scale(0.55);
}

.ht-pr-item.ht-pr-met .ht-pr-icon-met {
    opacity: 1;
    transform: none;
}

.ht-pr-label {
    min-width: 0;
}

/* The special-character set is long and has no spaces to break on. */
.ht-pr-chars {
    display: inline-block;
    font-family: Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    word-break: break-all;
}

/* Screen-reader-only: per-row met/not-met text and the debounced summary. */
.ht-pr-state,
.ht-pr-status {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .ht-pr-item,
    .ht-pr-icon {
        transition: none;
    }
}

/* Stacked under the fields on narrow screens: pull it closer to the inputs it
   describes and soften the panel so it does not compete with the form. */
@media (max-width: 959px) {
    .ht-password-requirements {
        padding: 16px 18px;
    }
}
