/**
 * ImmigraSuite Admin - Credit Notes
 * =================================
 *
 * The consequences panel on the credit-note creation form. It appears
 * under the Situation radio and states, before the operator presses
 * Create, who bears the credit, what it does to the DR balance, and what
 * the client's Tax Invoice and Statement of Service will show.
 *
 * That panel is the part that stops wrong credit notes being created —
 * the form it replaced offered a free-text Reason box, so every manual
 * credit note landed in the `adjustment` fallback and four different
 * meanings ended up indistinguishable.
 *
 * All classes use the `is-` prefix. Dark variants included — Growmore
 * runs dark mode daily.
 */

.is-cn-consequences {
    border: 1px solid rgb(191 219 254);
    background: rgb(239 246 255);
    border-radius: 0.5rem;
    padding: 0.75rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.is-cn-consequences-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(29 78 216);
}

.is-cn-consequence {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.is-cn-consequence-key {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgb(71 85 105);
}

.is-cn-consequence-value {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgb(15 23 42);
}

/* Two columns once there is room — the three consequences read as a
   row of facts rather than a stack on a wide screen. */
@media (min-width: 768px) {
    .is-cn-consequences {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.875rem;
    }

    .is-cn-consequences-title {
        grid-column: 1 / -1;
    }
}

/* ==========================================================================
   Dark mode
   ========================================================================== */

.dark .is-cn-consequences {
    border-color: rgb(30 58 138);
    background: rgb(23 37 84 / 0.45);
}

.dark .is-cn-consequences-title {
    color: rgb(147 197 253);
}

.dark .is-cn-consequence-key {
    color: rgb(148 163 184);
}

.dark .is-cn-consequence-value {
    color: rgb(226 232 240);
}

/* ==========================================================================
   Unclassified warning — View Credit Note
   ==========================================================================
   Shown on a credit note that names no situation this system recognises.
   These are the rows the integrity check reports; saying so on the record
   itself beats leaving someone to wonder why the Situation badge reads
   "Unclassified". */

.is-cn-unclassified {
    border: 1px solid rgb(252 211 77);
    background: rgb(255 251 235);
    border-radius: 0.5rem;
    padding: 10px 12px;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgb(146 64 14);
}

.dark .is-cn-unclassified {
    border-color: rgb(120 53 15);
    background: rgb(69 26 3 / 0.5);
    color: rgb(253 230 138);
}

/* ==========================================================================
   Void confirmation modal
   ==========================================================================
   Moved out of inline styles when the action became a shared factory —
   the same markup now renders from the credit note's view page, the
   Credit Notes list and the Deposit Request, so it needed a home that
   supports dark mode rather than hard-coded light colours. */

.is-cn-void {
    font-size: 0.875rem;
    line-height: 1.45;
}

.is-cn-void-lead {
    margin-bottom: 8px;
}

.is-cn-void-lead.is-muted {
    opacity: 0.55;
    margin-bottom: 14px;
}

.is-cn-void-hint {
    background: rgb(249 250 251);
    border: 1px solid rgb(229 231 235);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: rgb(107 114 128);
}

.is-cn-void-blocked {
    background: rgb(254 242 242);
    border-left: 4px solid rgb(220 38 38);
    border-radius: 6px;
    padding: 12px 14px;
    color: rgb(127 29 29);
}

.is-cn-void-blocked-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.is-cn-void-blocked-grid {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 6px 12px;
    font-size: 0.825rem;
    color: rgb(153 27 27);
}

.is-cn-void-key {
    font-weight: 600;
    opacity: 0.75;
}

.is-cn-void code {
    background: rgb(220 38 38 / 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.78rem;
}

/* ---- Dark mode ---- */

.dark .is-cn-void-hint {
    background: rgb(30 41 59 / 0.6);
    border-color: rgb(51 65 85);
    color: rgb(148 163 184);
}

.dark .is-cn-void-blocked {
    background: rgb(69 10 10 / 0.5);
    color: rgb(254 202 202);
}

.dark .is-cn-void-blocked-grid {
    color: rgb(252 165 165);
}

.dark .is-cn-void code {
    background: rgb(220 38 38 / 0.25);
}
