/*
 * Bar Bonsoir — typography.
 *
 * Headline: ITC Cheltenham Bold Condensed (poster voice).
 * Deco:     Cinzel (engraved brass plaques: labels, nav, buttons).
 * Body:     Plantin MT Pro (warm newspaper serif).
 * Voices:   Special Elite (typewritten notes from René / Flavie), Parisienne (signatures).
 *
 * Element rules are scoped to body.nbb-bar-bonsoir so other Neve views are untouched.
 * nbb-* component classes are unscoped so they also preview inside the block editor.
 */

body.nbb-bar-bonsoir {
    color: var(--nbb-ink);
    font-family: var(--nbb-font-body);
    font-size: var(--nbb-fs-body);
    line-height: var(--nbb-lh-body);
    font-feature-settings: "kern" 1, "liga" 1;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.nbb-bar-bonsoir :is(h1, h2, h3, h4, h5, h6) {
    color: var(--nbb-ink);
    font-family: var(--nbb-font-headline);
    font-weight: 700;
    line-height: var(--nbb-lh-tight);
    letter-spacing: var(--nbb-track-headline);
    margin-block: 0.4em 0.45em;
    text-wrap: balance;
}

body.nbb-bar-bonsoir :is(h1, h2) {
    text-transform: uppercase;
}

body.nbb-bar-bonsoir h1 { font-size: var(--nbb-fs-h1); }
body.nbb-bar-bonsoir h2 { font-size: var(--nbb-fs-h2); }
body.nbb-bar-bonsoir h3 { font-size: var(--nbb-fs-h3); line-height: 1.12; }
body.nbb-bar-bonsoir h4 { font-size: var(--nbb-fs-h4); line-height: 1.18; }

body.nbb-bar-bonsoir :is(h5, h6) {
    font-family: var(--nbb-font-deco);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: var(--nbb-track-deco);
    text-transform: uppercase;
    color: var(--nbb-accent);
}

body.nbb-bar-bonsoir h6 {
    font-size: var(--nbb-fs-label);
}

body.nbb-bar-bonsoir p {
    margin-block: 0 1.05em;
    text-wrap: pretty;
}

body.nbb-bar-bonsoir :is(strong, b) {
    font-weight: 600;
}

body.nbb-bar-bonsoir :is(table, .tc_event_date_title_front, .woocommerce-Price-amount) {
    font-variant-numeric: lining-nums tabular-nums;
}

body.nbb-bar-bonsoir abbr[title] {
    font-variant-caps: all-small-caps;
    letter-spacing: 0.05em;
    text-decoration: none;
}

body.nbb-bar-bonsoir :is(ul, ol) li::marker {
    color: var(--nbb-accent);
}

/* Links ------------------------------------------------------------------- */

body.nbb-bar-bonsoir a {
    color: var(--nbb-accent);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(var(--nbb-accent-rgb), 0.45);
    text-underline-offset: 0.22em;
    border-bottom: 0;
    transition: color var(--nbb-dur-fast) ease, text-decoration-color var(--nbb-dur-fast) ease;
}

body.nbb-bar-bonsoir a:hover {
    color: var(--nbb-accent-hover);
    text-decoration-color: currentColor;
}

body.nbb-bar-bonsoir a:focus-visible {
    outline: 2px solid var(--nbb-focus-ring-color);
    outline-offset: var(--nbb-focus-ring-offset);
    border-radius: var(--nbb-radius-xs);
}

body.nbb-bar-bonsoir :is(h1, h2, h3, h4) a {
    color: inherit;
    text-decoration: none;
}

body.nbb-bar-bonsoir ::selection {
    background: rgba(var(--nbb-crimson-rgb), 0.85);
    color: var(--nbb-parchment);
}

/* Quotes ------------------------------------------------------------------ */

body.nbb-bar-bonsoir blockquote:not([class*="is-style-nbb-"]) {
    position: relative;
    margin: var(--nbb-space-6) 0;
    padding: var(--nbb-space-2) 0 var(--nbb-space-2) var(--nbb-space-6);
    border: 0;
    border-inline-start: 1px solid var(--nbb-rule-strong);
    background: none;
    color: var(--nbb-ink-soft);
    font-style: italic;
    font-size: 1.12em;
    line-height: 1.55;
}

body.nbb-bar-bonsoir blockquote:not([class*="is-style-nbb-"])::before {
    content: "\201C";
    position: absolute;
    inset-inline-start: -0.06em;
    top: -0.32em;
    font-family: var(--nbb-font-headline);
    font-size: 3.4em;
    font-style: normal;
    line-height: 1;
    color: rgba(var(--nbb-accent-rgb), 0.55);
    transform: translateX(-50%);
    pointer-events: none;
}

body.nbb-bar-bonsoir blockquote cite {
    display: block;
    margin-top: var(--nbb-space-3);
    font-family: var(--nbb-font-deco);
    font-style: normal;
    font-size: var(--nbb-fs-label);
    letter-spacing: var(--nbb-track-label);
    text-transform: uppercase;
    color: var(--nbb-ink-muted);
}

/* Kicker: engraved brass plaque label ------------------------------------- */

.nbb-kicker,
.is-style-nbb-kicker-heading {
    display: flex;
    align-items: center;
    gap: 0.85em;
    font-family: var(--nbb-font-deco) !important;
    font-size: var(--nbb-fs-label) !important;
    font-weight: 600 !important;
    letter-spacing: var(--nbb-track-label) !important;
    line-height: 1.3 !important;
    text-transform: uppercase;
    color: var(--nbb-accent) !important;
    margin: 0 0 var(--nbb-space-3);
}

.nbb-kicker.has-text-align-center,
.is-style-nbb-kicker-heading.has-text-align-center {
    justify-content: center;
}

/* Kicker heading block: a display-sized engraved subtitle (content uses it as a tagline). */
.is-style-nbb-kicker-heading {
    font-size: clamp(0.95rem, 0.8rem + 0.75vw, 1.35rem) !important;
    letter-spacing: 0.16em !important;
    line-height: 1.45 !important;
    color: var(--nbb-brass-bright) !important;
    text-wrap: balance;
}

.nbb-kicker::before,
.nbb-kicker::after,
.is-style-nbb-kicker-heading::before,
.is-style-nbb-kicker-heading::after {
    content: "";
    flex: 0 0 auto;
    width: 0.4em;
    height: 0.4em;
    border-radius: 50%;
    background: #ffd7dc;
    box-shadow: 0 0 0 1.5px var(--nbb-neon-red), 0 0 8px 1px rgba(var(--nbb-neon-red-rgb), 0.7);
}

.nbb-kicker:not(.has-text-align-center)::after,
.is-style-nbb-kicker-heading:not(.has-text-align-center)::after {
    width: 2.5em;
    height: 2px;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(var(--nbb-neon-red-rgb), 0.9), 0 0 8px rgba(var(--nbb-neon-red-rgb), 0.6);
}

:is(.nbb-tone-parchment, .is-style-nbb-section-parchment) :is(.nbb-kicker, .is-style-nbb-kicker-heading)::before,
:is(.nbb-tone-parchment, .is-style-nbb-section-parchment) :is(.nbb-kicker, .is-style-nbb-kicker-heading)::after {
    background: var(--nbb-lip-red);
    box-shadow: none;
}

/* Character voices -------------------------------------------------------- */

/*
 * Typewritten note (Flavie's notes, ticket remarks, practical info).
 * Usage: paragraph/group with class "nbb-note" or block style "Typewriter note".
 * A leading <strong> becomes the stamped header ("Nota van Flavie").
 */
.nbb-note,
.is-style-nbb-typewriter-note,
.is-style-nbb-warning-note {
    --nbb-note-stamp: var(--nbb-brass-deep);
    position: relative;
    max-width: 38rem;
    margin: var(--nbb-space-6) auto;
    padding: var(--nbb-space-5) var(--nbb-space-5) var(--nbb-space-4);
    background:
        var(--nbb-paper-image) 0 0 / var(--nbb-paper-size) var(--nbb-paper-size) repeat,
        var(--nbb-parchment);
    color: var(--nbb-sepia-ink);
    font-family: var(--nbb-font-typewriter);
    font-size: 0.98rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 0 rgba(var(--nbb-sepia-ink-rgb), 0.06), 0 16px 30px -18px rgba(var(--nbb-mahogany-rgb), 0.9);
    transform: rotate(-0.6deg);
}

/* Strip of tape holding the note to the wall. */
.nbb-note::before,
.is-style-nbb-typewriter-note::before,
.is-style-nbb-warning-note::before {
    content: "";
    position: absolute;
    top: -0.7rem;
    left: 50%;
    width: 5.5rem;
    height: 1.4rem;
    background: rgba(var(--nbb-parchment-aged-rgb), 0.72);
    box-shadow: inset 0 0 0 1px rgba(var(--nbb-sepia-ink-rgb), 0.06);
    transform: translateX(-50%) rotate(2deg);
    pointer-events: none;
}

:is(.nbb-note, .is-style-nbb-typewriter-note, .is-style-nbb-warning-note) > :first-child {
    margin-top: 0;
}

:is(.nbb-note, .is-style-nbb-typewriter-note, .is-style-nbb-warning-note) > :last-child {
    margin-bottom: 0;
}

:is(.nbb-note, .is-style-nbb-typewriter-note, .is-style-nbb-warning-note) :is(p, li) {
    color: inherit;
    font-family: inherit;
}

:is(.nbb-note, .is-style-nbb-typewriter-note, .is-style-nbb-warning-note) strong:first-child {
    display: inline-block;
    margin-bottom: var(--nbb-space-2);
    padding: 0.1em 0.55em;
    border: 1.5px solid var(--nbb-note-stamp);
    color: var(--nbb-note-stamp);
    font-family: var(--nbb-font-deco);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: var(--nbb-track-label);
    text-transform: uppercase;
    transform: rotate(-1.5deg);
}

/* René's warning: crimson rubber stamp, sterner tilt. */
.nbb-note--warning,
.is-style-nbb-warning-note {
    --nbb-note-stamp: var(--nbb-crimson);
    border-inline-start: 3px solid var(--nbb-crimson);
    transform: rotate(0.5deg);
}

/* Script signature (Flavie's sign-off). */
.nbb-signature,
.nbb-letter-signoff,
.handwritten {
    font-family: var(--nbb-font-script) !important;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    color: var(--nbb-ink);
}

/* -------------------------------------------------------------------------- */
/* Typed on paper: worn typewriter face, ribbon ink that bleeds into the fibre */
/* -------------------------------------------------------------------------- */

:root {
    --nbb-type-ink: #2b2018;
    --nbb-type-ink-rgb: 43, 32, 24;
    /* Ink bleed + a faint second strike, offset like a slightly loose typebar. */
    --nbb-type-bleed:
        0 0 0.5px rgba(var(--nbb-type-ink-rgb), 0.85),
        0.35px 0.2px 0 rgba(var(--nbb-type-ink-rgb), 0.35),
        0 0 1.6px rgba(var(--nbb-type-ink-rgb), 0.18);
}

body.nbb-bar-bonsoir .wp-block-details,
body.nbb-bar-bonsoir .wp-block-details :is(summary, p, li),
.nbb-pattern-letter .nbb-letter-body :is(p, li):not(.nbb-letter-signoff),
:is(.is-style-nbb-section-parchment, .nbb-tone-parchment) :is(p, li):not(.nbb-kicker, .nbb-signature, .nbb-letter-signoff, .handwritten),
:is(.nbb-note, .is-style-nbb-typewriter-note, .is-style-nbb-warning-note),
:is(.nbb-note, .is-style-nbb-typewriter-note, .is-style-nbb-warning-note) :is(p, li) {
    font-family: var(--nbb-font-typewriter);
    font-weight: 400;
    color: var(--nbb-type-ink);
    text-shadow: var(--nbb-type-bleed);
    letter-spacing: 0.01em;
    font-kerning: none;
    font-variant-ligatures: none;
}

/* FAQ questions: typed in capitals, struck twice for emphasis (no bold weight on a typewriter). */
body.nbb-bar-bonsoir .wp-block-details summary {
    font-family: var(--nbb-font-typewriter) !important;
    font-size: clamp(0.98rem, 0.94rem + 0.2vw, 1.08rem) !important;
    letter-spacing: 0.04em !important;
    text-shadow:
        var(--nbb-type-bleed),
        0.6px 0 0 rgba(var(--nbb-type-ink-rgb), 0.55);
}

/* Answers: a softer, lighter ribbon pass. */
body.nbb-bar-bonsoir .wp-block-details > :not(summary),
body.nbb-bar-bonsoir .wp-block-details > :not(summary) :is(p, li) {
    color: #3a2c21;
    font-size: 0.97rem;
    line-height: 1.75;
}

/* Typed links: underlined in the crimson second ribbon colour. */
body.nbb-bar-bonsoir .wp-block-details a,
.nbb-pattern-letter .nbb-letter-body a,
:is(.is-style-nbb-section-parchment, .nbb-tone-parchment) a {
    color: var(--nbb-crimson);
    text-shadow: 0 0 0.5px rgba(var(--nbb-crimson-rgb), 0.7);
}

/* Small engraved meta text (dates, venues, prices). */
.nbb-meta {
    font-family: var(--nbb-font-deco);
    font-size: var(--nbb-fs-label);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--nbb-ink-muted);
    font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 600px) {
    .nbb-note,
    .is-style-nbb-typewriter-note,
    .is-style-nbb-warning-note {
        transform: none;
        padding: var(--nbb-space-5) var(--nbb-space-4) var(--nbb-space-4);
    }
}
