/* Shared "I confirm…" tick — one look for every confirmation in the app.
   Same behaviour as the Upload-to-portal popup (SelectFyMonthDialog .sfmd-confirm):
   the action button stays live; pressing it without the tick turns this row red,
   nudges it once and shows "Tick this to continue" — a disabled button teaches nothing.
   Markup:
     <div class="spq-confirm is-confirmed|is-missing">
        <input type="checkbox" class="form-check-input spq-confirm-box" id="x" />
        <label class="spq-confirm-label" for="x">…</label>
        <span class="spq-confirm-hint"><i class="bi bi-exclamation-triangle-fill"></i> Tick this to continue</span>
     </div> */

.spq-confirm {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--bd, #d7dce3);
    background: var(--sf-subtle, #f6f8fa);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
    cursor: pointer;
}

.spq-confirm.is-confirmed {
    border-color: #39a85b;
    background: var(--sf-subtle, #e8f8ed);
    box-shadow: inset 0 0 0 1px rgba(57,168,91,.22);
}

.spq-confirm.is-missing {
    border-color: #d64545;
    background: var(--sf-raised, #fdecec);
    box-shadow: 0 0 0 3px rgba(214,69,69,.16);
    animation: spq-confirm-nudge .32s ease-in-out 2;
}

@keyframes spq-confirm-nudge {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    .spq-confirm.is-missing { animation: none; }
}

.spq-confirm .spq-confirm-box {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    float: none;
}

.spq-confirm.is-missing .spq-confirm-box { border-color: #d64545; }

.spq-confirm .spq-confirm-label {
    margin: 0;
    cursor: pointer;
    font-size: .88rem;
    line-height: 1.35;
    color: var(--tc-text, #2b3442);
    flex: 1 1 200px;
    min-width: 0;
}

.spq-confirm.is-confirmed .spq-confirm-label { color: color-mix(in srgb, #1d6b36 var(--ink-keep, 100%), var(--ink-flip, #1d6b36)); }
.spq-confirm.is-missing .spq-confirm-label { color: color-mix(in srgb, #9b2c2c var(--ink-keep, 100%), var(--ink-flip, #9b2c2c)); }

.spq-confirm-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: clamp(1, calc(600 + var(--spq-fw-delta, 0)), 1000);
    color: color-mix(in srgb, #b02a2a var(--ink-keep, 100%), var(--ink-flip, #b02a2a));
    flex-shrink: 0;
}

body.dark-only .spq-confirm.is-confirmed { background: rgba(57,168,91,.16); }
body.dark-only .spq-confirm.is-missing { background: rgba(214,69,69,.14); }

/* Phones: tick + sentence stack, hint on its own line; row is a ≥44px tap target. */
@media (max-width: 575.98px) {
    .spq-confirm {
        padding: 12px;
        align-items: flex-start;
        min-height: 44px;
    }
    .spq-confirm .spq-confirm-label { flex-basis: calc(100% - 32px); }
    .spq-confirm-hint { flex-basis: 100%; margin-left: 30px; }
}

/* #region Arun - confirm gate, shared pieces (25-Oct-2026). Docs\ConfirmGateStandard.md.
   SpqConfirmTick renders the row above; these are its two companions plus the field state. */

.spq-confirm.is-missing .spq-confirm-box {
    outline: 2px solid #d64545;
    outline-offset: 1px;
}

/* "Pending: ..." - muted line beside the action saying what it still needs (SpqPendingNote). */
.spq-pending {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 6px;
    font-size: .78rem;
    line-height: 1.35;
    color: var(--tc-muted, #6c757d);
}

/* Red "what is missing" message after an early press (SpqNeedNote). */
.spq-need {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 6px;
    font-size: .8rem;
    line-height: 1.35;
    font-weight: clamp(1, calc(600 + var(--spq-fw-delta, 0)), 1000);
    color: color-mix(in srgb, #b02a2a var(--ink-keep, 100%), var(--ink-flip, #b02a2a));
}

/* Any input / select the action needs and does not have yet: red, nudged once. */
.spq-field-missing,
.form-control.spq-field-missing,
.form-select.spq-field-missing {
    border-color: #d64545 !important;
    box-shadow: 0 0 0 3px rgba(214,69,69,.16) !important;
    animation: spq-confirm-nudge .32s ease-in-out 2;
}

@media (prefers-reduced-motion: reduce) {
    .spq-field-missing { animation: none; }
}
/* #endregion */
