/**
 * Default styling for the live password-policy indicator. Drop this
 * file into your site's CSS pipeline or include it via TypoScript
 * page.includeCSS. The markup is namespaced under `.fe-password-policy`
 * so it won't collide with the surrounding form layout.
 */
.fe-password-policy {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.fe-password-policy__heading {
    color: #555;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.fe-password-policy__rules {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fe-password-policy__rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.125rem 0;
    color: #6c757d;
    transition: color 0.15s ease-in-out;
}

.fe-password-policy__rule.is-met {
    color: #1f8a3a;
}

.fe-password-policy__marker {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.15s ease-in-out;
}

.fe-password-policy__rule.is-met .fe-password-policy__marker {
    opacity: 1;
}

/* ✓ / ✕ glyphs drawn with the same color as the marker bullet,
   inverted so they read as cut-outs on the filled circle. */
.fe-password-policy__marker::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #fff;
    -webkit-mask: var(--fe-password-policy-icon-unmet, none) center / 60% 60% no-repeat;
    mask: var(--fe-password-policy-icon-unmet, none) center / 60% 60% no-repeat;
}

.fe-password-policy__rule.is-met .fe-password-policy__marker::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 6.5-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 6.5-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.fe-password-policy__rule.is-unmet .fe-password-policy__marker::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='2' fill='black'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='2' fill='black'/></svg>");
}

.fe-password-policy__label {
    flex: 1 1 auto;
}
