/* CloudYork Vertical Signal. Enabled only by the authentication-page hook. */
.cy-auth-loader {
    --cy-auth-accent: var(--cy-purple, #673de6);
    --cy-auth-ink: var(--cy-navy, #001233);
    --cy-auth-outer: var(--cy-navy, #001233);
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: grid;
    place-items: center;
    /* Exact visual values from #cy-language-dialog::backdrop. */
    background:rgba(0,18,51,.38); backdrop-filter:blur(2px);
    color: var(--cy-auth-ink);
    border-radius: 0;
}
.cy-auth-loader[hidden] { display: none; }
.cy-auth-loader__content {
    --cy-auth-accent: var(--cy-purple, #673de6);
    --cy-auth-outer: var(--cy-navy, #001233);
    box-sizing: border-box;
    width: 300px;
    max-width: calc(100vw - 32px);
    padding: 36px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--cy-navy, #001233);
    box-shadow: 0 12px 40px rgba(0, 18, 51, .16);
    text-align: center;
    overflow-wrap: break-word;
}
.cy-auth-loader__signal { display: flex; align-items: center; justify-content: center; gap: 7px; height: 64px; }
.cy-auth-loader__signal span { display: block; width: 8px; height: 52px; border-radius: 0; background: var(--cy-auth-accent); transform-origin: center; animation: cy-auth-signal 1.15s ease-in-out infinite; }
.cy-auth-loader__signal span:nth-child(1) { background: var(--cy-auth-outer); animation-delay: -.48s; }
.cy-auth-loader__signal span:nth-child(2) { animation-delay: -.36s; }
.cy-auth-loader__signal span:nth-child(3) { animation-delay: -.24s; }
.cy-auth-loader__signal span:nth-child(4) { animation-delay: -.12s; }
.cy-auth-loader__signal span:nth-child(5) { background: var(--cy-auth-outer); }
.cy-auth-loader .cy-auth-loader__text { margin: 20px 0 0; color: inherit; font: inherit; font-size: 18px; font-weight: 500; line-height: 1.5; text-align: center; }
[data-cy-auth-pending] [type="submit"] { cursor: wait; opacity: .65; }
@keyframes cy-auth-signal { 0%, 100% { transform: scaleY(.35); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .cy-auth-loader__signal span { animation: none; opacity: .9; }
    .cy-auth-loader__signal span:nth-child(1), .cy-auth-loader__signal span:nth-child(5) { transform: scaleY(.4); }
    .cy-auth-loader__signal span:nth-child(2), .cy-auth-loader__signal span:nth-child(4) { transform: scaleY(.7); }
}
/* Dark colors follow the page theme: OS dark preference alone leaves WHMCS's white authentication forms unchanged. */
[data-theme="dark"] .cy-auth-loader, [data-bs-theme="dark"] .cy-auth-loader { --cy-auth-accent: #b299ff; --cy-auth-outer: #d0d7e8; --cy-auth-ink: #f5f6fb; background:rgba(0,18,51,.38); }
@media (max-width: 480px) { .cy-auth-loader__signal { gap: 6px; height: 56px; } .cy-auth-loader__signal span { width: 6px; height: 44px; } .cy-auth-loader .cy-auth-loader__text { margin-top: 18px; font-size: 17px; } }

/* Reuse CloudYork's existing inline-error typography and color, scoped to auth. */
[data-cy-auth-validation] .cy-field-error { color: #9e283b; font-size: 14px; line-height: 1.5; margin: 6px 0 0; border-radius: 0; }
[data-cy-auth-validation] .cy-field-error:empty { display: none; }
[data-cy-auth-validation] .form-control[aria-invalid="true"] { border-color: #a72c42; outline-color: #a72c42; border-radius: 0; }
[data-theme="dark"] [data-cy-auth-validation] .cy-field-error,
[data-bs-theme="dark"] [data-cy-auth-validation] .cy-field-error { color: #ffabb9; }
