/**
 * Delete confirmation modals — impact list and consent control.
 *
 * Markup: templates/components/modals/delete_modals.html
 * Behaviour: static/js/delete_modals.js
 *
 * The modal previously listed each related record with a Bootstrap checkbox
 * beside it and disabled Delete until every one was ticked. Those ticks fed
 * nothing — the POST carries no selection and the service cascades regardless —
 * so they read as a manifest of consequences rather than controls, and a
 * hairline neutral border on a tinted panel made them near-invisible on a
 * phone outdoors.
 *
 * The list is now inert and styled as a list. Exactly one control survives, and
 * only when live money is attached, so it can afford to be loud: full-width
 * panel, 2px border, 1.5rem box, whole panel is the tap target.
 */

/* --- Impact list (read-only) ---------------------------------------------- */

.delete-modal__caveat {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.delete-impact {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.delete-impact__heading {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.625rem 0.875rem;
    text-transform: uppercase;
}

.delete-impact__item {
    align-items: baseline;
    display: flex;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
}

.delete-impact__item + .delete-impact__item {
    border-top: 1px solid var(--border-color);
}

.delete-impact__icon {
    flex-shrink: 0;
}

.delete-impact__text {
    min-width: 0;
}

/* --- Consent control ------------------------------------------------------ */

.delete-consent {
    align-items: flex-start;
    background-color: var(--alert-danger-bg);
    border: 2px solid var(--danger-color);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    gap: 0.875rem;
    margin-bottom: 0;
    padding: 1rem;
}

/* Beats the .delete-consent display:flex above, so [hidden] still hides. */
.delete-consent[hidden] {
    display: none;
}

.delete-consent__box.form-check-input {
    border: 2px solid var(--danger-color);
    flex-shrink: 0;
    height: 1.5rem;
    margin: 0;
    width: 1.5rem;
}

.delete-consent__box.form-check-input:checked {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.delete-consent__text {
    font-weight: 500;
    line-height: 1.5rem;
}

/* Tapping Delete while this is unticked flashes the panel rather than leaving
   a dead button. Honours reduced-motion by falling back to the border alone. */
.delete-consent--nudge {
    animation: delete-consent-nudge 0.4s ease;
}

@keyframes delete-consent-nudge {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-0.375rem); }
    75% { transform: translateX(0.375rem); }
}

@media (prefers-reduced-motion: reduce) {
    .delete-consent--nudge {
        animation: none;
        box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.35);
    }
}
