/*
 * einvoicing.pk — page-scoped styles for the FBR IRIS guide pages.
 *
 * Package I2; refit to the Compliance Register world (D3). Loaded only by
 * /guides/fbr-iris/**. It extends the frozen tools.css class inventory.
 * Register labels, squared marks, hairline rules, no pills, no shadows.
 */

[hidden] {
    display: none !important;
}

/*
 * tools.css sets `.st-content a { color: var(--accent-ink) }`, which beats
 * `.st-btn--primary` on specificity; keep the frozen button text colour here
 * for the page-scoped stylesheets' sake.
 */
.st-content a.st-btn--primary,
.iris-assistant a.st-btn--primary {
    color: var(--c-white);
}

.st-content a.st-btn--primary:hover,
.iris-assistant a.st-btn--primary:hover {
    color: var(--c-white);
}

/* ---------- Assistant shell (hidden until iris-guide.js runs) ---------- */

.iris-assistant {
    margin-top: var(--space-5);
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--rule);
    background: var(--paper-soft);
}

.iris-assistant h2 {
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.iris-stage {
    margin-top: var(--space-4);
}

.iris-stage__title {
    margin: 0;
    font-size: var(--fs-h3);
    font-weight: 600;
    letter-spacing: -0.012em;
}

.iris-stage__title:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.iris-stage p {
    margin-top: 0.5rem;
    max-width: 68ch;
}

.iris-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.iris-choices li {
    margin: 0;
}

.iris-choice {
    text-align: left;
    white-space: normal;
}

.iris-stage__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.iris-stage__anchor {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--accent-ink);
}

.iris-stage__done {
    margin-top: 0.9rem;
}

.iris-assistant__controls {
    display: flex;
    gap: 0.6rem;
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--rule);
}

.iris-assistant__controls button {
    padding: 0.55rem 0.95rem;
    font-size: var(--fs-sm);
}

/* ---------- Official action and marks ---------- */

.iris-action {
    margin-top: 0.6rem;
}

.iris-action + .st-help {
    margin-top: 0.4rem;
}

.iris-action__host {
    color: var(--ink-2);
    font-size: var(--fs-xs);
    word-break: break-all;
}

.iris-action__meta {
    margin-top: 0.4rem;
}

.iris-badge {
    display: inline-block;
    margin: 0.1rem 0.2rem 0.1rem 0;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--rule-strong);
    background: var(--paper);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--ink-2);
}

.iris-badge--pending {
    border-color: rgba(200, 80, 47, 0.4);
    background: rgba(200, 80, 47, 0.06);
    color: var(--danger-ink);
}

.iris-badge--conflict {
    border-color: rgba(200, 80, 47, 0.55);
    background: rgba(200, 80, 47, 0.08);
    color: var(--danger-ink);
}

.iris-badge--sourced {
    border-color: rgba(38, 166, 154, 0.4);
    background: var(--c-teal-ultra);
    color: var(--c-slate-deep);
}

/* The per-section open points are audit notes, not prose. Quiet them. */
.iris-claims {
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--rule);
    font-size: var(--fs-xs);
}

.iris-claims__label {
    font-weight: 600;
    color: var(--ink-2);
}

/* ---------- Sections and steps ---------- */

.iris-section + .iris-section {
    margin-top: var(--space-6);
}

.iris-steps {
    margin: 0.8rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: iris-step;
}

.iris-step {
    padding: 1rem 0 0;
    border-top: 1px solid var(--rule);
}

.iris-step + .iris-step {
    margin-top: 1.1rem;
}

.iris-step__title {
    font-size: 1.0625rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.iris-step__label {
    margin-top: 0.6rem;
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.iris-step ul {
    margin: 0.25rem 0 0;
}

.iris-refs {
    margin-top: 0.55rem;
}

.iris-checklist ul {
    margin: 0.6rem 0;
    padding-left: 1.4rem;
}

.iris-copy-status:empty {
    display: none;
}

/* ---------- Sources list ---------- */

.iris-sources {
    margin: var(--space-4) 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--rule);
}

.iris-source-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
}

/* Long unbreakable evidence strings (URLs) must not widen the mobile
 * layout viewport. */
.iris-source-item,
.iris-source-item .st-help,
.iris-source-item__title a {
    overflow-wrap: anywhere;
}

.iris-source-item__title {
    font-weight: 600;
}

.iris-source-item .st-help {
    margin-top: 0.15rem;
    max-width: 90ch;
}

/* ---------- Responsive ---------- */

@media (max-width: 30rem) {
    .iris-assistant {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .iris-assistant,
    .iris-stage,
    .iris-step {
        transition: none;
    }
}

.iris-assistant { border: 0; border-radius: var(--radius); padding: clamp(1.25rem,3vw,2rem); background: var(--c-teal-ultra); }
.iris-assistant h2 { font-size: 1.25rem; text-transform: none; letter-spacing: -.02em; color: var(--ink); }
.st-content .iris-choices { list-style: none; padding: 0; }
.st-content .iris-choices li { margin: 0; }
.iris-step { border: 0; }
.iris-sources, .iris-source-item { border: 0; }
.st-content .iris-sources { padding: 0; list-style: none; }
