/* =============================================================================
   Nibsy render-card styles — GLOBAL (not component-scoped).

   Each card (template-picker, buyer-preview, editable-copy, show-picker,
   showtime-grid, smart-filter-summary, publish-checklist) is its own Blazor
   component mounted by NibsyChat via <DynamicComponent>. CSS isolation scopes
   a component's .razor.css to its OWN markup, so these styles cannot live in
   NibsyChat.razor.css — the card components' elements never carry NibsyChat's
   scope attribute, and the rules silently don't apply (white inputs, unstyled
   cards). Keeping them global is the fix.
   ============================================================================= */

/* ── Card slot (DynamicComponent) ──────────────────────── */
.nb-card-slot {
    align-self: stretch;
}

.nb-card {
    background: #0C2119;
    border: 1px solid #1F5C42;
    border-left: 3px solid #14D884;
    border-radius: 10px;
    padding: 14px;
    margin: 4px 0;
}

.nb-card__title {
    font-weight: 700;
    font-size: 13px;
    color: #F5FFF9;
    margin-bottom: 8px;
}

.nb-card__subtitle {
    font-size: 11px;
    color: #9DB4AA;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 8px 0 4px;
}

.nb-card__hint {
    color: #9DB4AA;
    font-size: 11px;
    margin-top: 8px;
}

.nb-card__empty {
    color: #9DB4AA;
    font-size: 12px;
    padding: 12px;
    text-align: center;
}

/* ── Template picker ───────────────────────────────────── */
.nb-templates {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.nb-template {
    padding: 12px;
    border: 1px solid #235A44;
    border-radius: 8px;
    background: #071A13;
}

.nb-template--hot {
    border-color: #14D884;
    box-shadow: 0 0 0 1px #14D884 inset;
}

.nb-template__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nb-template__name {
    font-size: 13px;
    color: #F5FFF9;
}

.nb-template__badge {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}
.nb-template__badge--green { background: #14D884; }
.nb-template__badge--blue { background: #64B5FF; }
.nb-template__badge--gold { background: #F4C35E; }

.nb-template__promise {
    color: #9DB4AA;
    font-size: 12px;
    margin-top: 4px;
}
.nb-template__behavior {
    color: #6F8C81;
    font-size: 11px;
    margin-top: 4px;
}

/* ── Buyer preview ─────────────────────────────────────── */
.nb-buyer {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.nb-buyer__cover {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    background-color: #133927;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #14D884;
}

.nb-buyer__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nb-buyer__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.nb-buyer__name {
    margin: 0;
    color: #F5FFF9;
    font-size: 16px;
}

.nb-buyer__price {
    color: #14D884;
    font-weight: 700;
    font-size: 16px;
}

.nb-buyer__category, .nb-buyer__promise {
    color: #9DB4AA;
    font-size: 12px;
}

.nb-buyer__description {
    color: #DDEBE3;
    margin: 4px 0;
    font-size: 13px;
}

.nb-buyer__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.nb-buyer__meta-item {
    font-size: 11px;
    color: #9DB4AA;
}

.nb-buyer__status {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 999px;
    background: #133927;
    color: #9DB4AA;
}

.nb-buyer__status--active { background: #14D884; color: #001B10; }
.nb-buyer__status--draft { background: #2F4435; color: #9DB4AA; }
.nb-buyer__status--soldout { background: #F4C35E; color: #1A1407; }
.nb-buyer__status--paused { background: #F4C35E; color: #1A1407; }

/* ── Show picker ───────────────────────────────────────── */
.nb-shows__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nb-shows__row {
    padding: 6px 0;
    border-top: 1px solid #154D39;
}
.nb-shows__row:first-child { border-top: none; }
.nb-shows__row label { display: flex; gap: 8px; align-items: center; cursor: default; }
.nb-shows__name { color: #F5FFF9; font-size: 13px; flex: 1; }
.nb-shows__meta { color: #9DB4AA; font-size: 11px; }

/* ── Showtime grid ─────────────────────────────────────── */
.nb-grid__event {
    margin-bottom: 12px;
}
.nb-grid__event-name {
    color: #F5FFF9;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.nb-grid__showtimes {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
.nb-grid__cell {
    padding: 6px;
    border: 1px solid #235A44;
    background: #071A13;
    color: #DDEBE3;
    border-radius: 6px;
    text-align: center;
    font-family: inherit;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nb-grid__cell--on { border-color: #14D884; background: #133927; color: #F5FFF9; }
.nb-grid__cell-date { font-weight: 600; }
.nb-grid__cell-time { color: #9DB4AA; }

/* ── Smart filter summary ──────────────────────────────── */
.nb-filter__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.nb-filter__rule {
    color: #9DB4AA;
    font-size: 11px;
}
.nb-filter__summary {
    color: #14D884;
    font-size: 12px;
    margin-bottom: 8px;
}
.nb-filter__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}
.nb-filter__list li {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #DDEBE3;
}
.nb-filter__date {
    width: 160px;
    color: #9DB4AA;
    font-family: 'Geist Mono', monospace;
}
.nb-filter__event { flex: 1; }

/* ── Editable copy ─────────────────────────────────────── */
.nb-copy__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.nb-copy__field label {
    color: #9DB4AA;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.nb-copy__field input, .nb-copy__field textarea {
    padding: 8px;
    border: 1px solid #235A44;
    border-radius: 6px;
    background: #071A13;
    color: #F5FFF9;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

/* ── Publish checklist ─────────────────────────────────── */
.nb-checklist__head {
    margin-bottom: 8px;
    font-size: 13px;
}
.nb-checklist__head--ok { color: #14D884; }
.nb-checklist__head--blocked { color: #FF7A7A; }
.nb-checklist__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nb-checklist__row {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 8px;
    align-items: start;
    font-size: 12px;
}
.nb-checklist__icon {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    margin-top: 4px;
    background: #14D884;
}
.nb-checklist__row--warn .nb-checklist__icon { background: #F4C35E; }
.nb-checklist__row--error .nb-checklist__icon { background: #FF7A7A; }
.nb-checklist__label { color: #F5FFF9; }
.nb-checklist__detail {
    grid-column: 2;
    color: #9DB4AA;
    font-size: 11px;
}
.nb-checklist__consequences { margin-top: 12px; }
.nb-checklist__consequences ul {
    list-style: disc;
    padding-left: 18px;
    color: #DDEBE3;
    font-size: 12px;
}

/* Markdown rendered inside assistant bubbles (links + bullets). These elements
   come from a MarkupString, so scoped CSS doesn't reach them — style globally. */
.nb-bubble__body .nb-link {
    color: #14D884;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nb-bubble__body .nb-link:hover {
    color: #3DDC97;
}

.nb-bubble__body .nb-bullet {
    display: block;
    padding-left: 14px;
    text-indent: -10px;
}
