/* Shared Figma "State · …" card (empty / error / expired / offline) — Views/Shared/_StateCard.cshtml.
   Source frames: 1739:24403 (404), 1739:24009 (session expired), 1739:20565 (offline), 1739:23745 (empty) and
   their mobile twins. Desktop: 1200px card, 32px padding/gap, 720px main column + context panel.
   Mobile: stacked, 20/24px padding, full-width buttons. */
.np-state-wrap, .np-state-wrap * { box-sizing: border-box; }

.np-state-wrap {
    width: min(100% - 40px, 1200px);
    margin: 40px auto 56px;
}

/* Inside an existing page container (empty list within an account page): no page-level margins. */
.np-state-wrap.np-state-inline { width: 100%; margin: 16px 0; }
.np-state-art { width: 48px; height: 48px; flex: none; }

.np-state {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 32px;
    background: var(--npj-surface, #fff);
    border: 1px solid var(--npj-border, #e4d6c4);
    border-radius: 16px;
    font-family: var(--npj-interface-font, 'Poppins', sans-serif);
}

.np-state-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 0 1 720px;
    min-width: 0;
}

.np-state-chip {
    align-self: flex-start;
    margin: 0;
    padding: 6px 12px;
    background: var(--npj-soft, #fcebdd);
    color: var(--npj-burgundy, #8b1a10);
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
}
.np-state-chip.is-error { color: var(--npj-error, #b3261e); }

.np-state-title {
    margin: 0;
    color: var(--npj-burgundy, #8b1a10);
    font-size: 28px;
    font-weight: 600;
    line-height: 38px;
    letter-spacing: 0;
}

.np-state-body {
    margin: 0;
    color: var(--npj-secondary, #574434);
    font-size: 16px;
    line-height: 26px;
}

.np-state-product {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 12px;
    background: var(--npj-soft, #fcebdd);
    border-radius: 10px;
    font-size: 14px;
    line-height: 22px;
}
.np-state-product img { flex: none; width: 80px; height: 96px; object-fit: cover; border-radius: 8px; }
.np-state-product > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.np-state-product p { margin: 0; color: var(--npj-secondary, #574434); overflow-wrap: anywhere; }
.np-state-product p.np-state-product-title { color: var(--npj-ink, #1c140d); font-weight: 600; }

/* POST recovery actions are forms; keep them sized like the link buttons. */
.np-state-form { flex: 1 1 0; min-width: 0; display: flex; margin: 0; }
.np-state-form .np-state-btn { width: 100%; }

.np-state-disabled {
    min-height: 44px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--npj-border, #e4d6c4);
    border-radius: var(--control-radius, 12px);
    color: var(--npj-secondary, #574434);
    font: 600 14px/22px var(--npj-interface-font, 'Poppins', sans-serif);
    text-align: center;
    cursor: not-allowed;
}

.np-state-field { display: flex; flex-direction: column; gap: 8px; min-height: 44px; }
.np-state-field label {
    margin: 0;
    color: var(--npj-burgundy, #8b1a10);
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
}
.np-state-field input {
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    background: var(--npj-surface, #fff);
    border: 1px solid var(--control-border, #9d7967);
    border-radius: var(--control-radius, 12px);
    color: var(--npj-burgundy, #8b1a10);
    font: 400 14px/22px var(--npj-interface-font, 'Poppins', sans-serif);
}

.np-state-field.is-error input { border-color: var(--npj-error, #b3261e); }

.np-state-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 16px;
    background: var(--npj-soft, #fcebdd);
    border-radius: 10px;
    font-size: 14px;
    line-height: 22px;
}
.np-state-details > div { display: flex; gap: 4px; }
.np-state-details dt {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    color: var(--npj-secondary, #574434);
    font-weight: 400;
}
.np-state-details dd {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    color: var(--npj-ink, #1c140d);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.np-state-actions { display: flex; gap: 12px; }

.np-state-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--npj-surface, #fff);
    border: 1px solid var(--control-border, #9d7967);
    border-radius: 24px;
    color: var(--npj-burgundy, #8b1a10);
    font: 600 14px/22px var(--npj-interface-font, 'Poppins', sans-serif);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.np-state-btn.is-primary {
    background: var(--npj-burgundy, #8b1a10);
    border-color: var(--npj-burgundy, #8b1a10);
    color: #fff;
}
/* Figma "Action / Back to main website": full width, 13px label, 8px padding. */
.np-state-context .np-state-context-btn { flex: none; width: 100%; padding: 8px; font-size: 13px; line-height: 17px; }
.np-state-btn:hover { text-decoration: none; filter: brightness(.96); }
.np-state-btn:focus-visible { outline: 3px solid var(--npj-saffron, #e8650a); outline-offset: 2px; }

.np-state-context {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: var(--npj-soft, #fcebdd);
    border-radius: 12px;
}
.np-state-context h2 {
    margin: 0;
    color: var(--npj-burgundy, #8b1a10);
    font-size: 20px;
    font-weight: 600;
    line-height: 30px;
}
.np-state-context p {
    margin: 0;
    color: var(--npj-secondary, #574434);
    font-size: 14px;
    line-height: 22px;
}

/* Compact: the card inside a narrow dialog (sign-in). Same content as the mobile layout, without the outer card.
   Selectors carry two classes so they win over dialog rules such as `.step h2` / `.step p`. */
.np-state-compact.np-state-wrap { width: 100%; margin: 0; }
.np-state-compact .np-state {
    flex-direction: column;
    gap: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
}
.np-state-compact .np-state-main { flex-basis: auto; width: 100%; gap: 12px; }
.np-state-compact .np-state-title { font-size: 20px; line-height: 30px; }
.np-state-compact .np-state-body { font-size: 14px; line-height: 22px; }
.np-state-compact .np-state-details > div { flex-direction: column; }
.np-state-compact .np-state-actions { flex-direction: column; }
/* Inside the consultation-start modal, `.np-consult-start p/button` (one class + one element) would otherwise
   restyle the chip, copy and buttons, so repeat the card's own look here with two classes. */
.np-state-compact .np-state-chip { font-size: 14px; line-height: 22px; font-weight: 600; margin: 0; }
.np-state-compact .np-state-context p { font-size: 14px; line-height: 22px; color: var(--npj-secondary, #574434); }
.np-state-compact .np-state-btn {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--control-border, #9d7967);
    border-radius: 24px;
    background: var(--npj-surface, #fff);
    color: var(--npj-burgundy, #8b1a10);
    font-size: 14px;
    line-height: 22px;
    font-weight: 600;
}
.np-state-compact .np-state-btn.is-primary { background: var(--npj-burgundy, #8b1a10); border-color: var(--npj-burgundy, #8b1a10); color: #fff; }
.np-state-compact .np-state-disabled { font-size: 14px; line-height: 22px; }
.np-state-compact .np-state-context { width: 100%; padding: 16px; gap: 8px; }

/* Consultation-start modal wrappers: keep the modal's 12px rhythm and honour [hidden] over display:flex. */
.np-consult-main { display: flex; flex-direction: column; gap: 12px; }
.np-consult-main[hidden], .np-consult-state[hidden] { display: none; }
.np-state-compact .np-state-context h2 { font-size: 16px; line-height: 24px; }

@media (max-width: 767.98px) {
    .np-state-wrap { width: min(100% - 40px, 1200px); margin: 24px auto 40px; }
    .np-state {
        flex-direction: column;
        gap: 32px;
        padding: 24px 20px;
        border-radius: 20px;
    }
    .np-state-main { flex-basis: auto; width: 100%; }
    .np-state-title { font-size: 20px; line-height: 30px; }
    .np-state-details > div { flex-direction: column; }
    .np-state-actions { flex-direction: column; }
    .np-state-context { width: 100%; }
}
