/* Conversation block under every /news/ article.
   Loaded only by news article pages, so it stays out of the site-wide sheet.
   Tokens come from style.min.css. */

.nc { margin-top: var(--spacing-xl); }
.nc-card {
    background: var(--color-white);
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(1.5rem, 5vw, 3.25rem);
}
.nc-head { border-bottom: 1px solid var(--color-cream-dark); padding-bottom: var(--spacing-md); margin-bottom: var(--spacing-lg); }
.nc-head h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); color: var(--color-maria-blue); margin: 0 0 .35rem; }
.nc-head p { font-size: .98rem; line-height: 1.7; color: var(--color-text-muted); margin: 0; }
.nc-head p a { color: var(--color-maria-blue); text-decoration: underline; text-underline-offset: 2px; }

/* ── reactions ─────────────────────────────────────────────── */
.nc-article-react {
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem;
    background: var(--color-cream); border-radius: var(--radius-md);
    padding: .9rem 1.1rem; margin-bottom: var(--spacing-lg);
}
.nc-react-label {
    font-family: var(--font-body); font-size: .78rem; font-weight: 700;
    letter-spacing: 1.1px; text-transform: uppercase; color: var(--color-text-muted);
}
.nc-reactions { display: flex; flex-wrap: wrap; gap: .4rem; }
.nc-react-btn {
    /* 44px minimum: these are the smallest tap targets on the page */
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-height: 44px; min-width: 44px; padding: 0 .7rem;
    border: 1px solid var(--color-cream-dark); border-radius: 999px;
    background: var(--color-white); cursor: pointer; font-size: 1.05rem; line-height: 1;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.nc-react-btn:hover { background: #EEF3FA; transform: translateY(-1px); }
.nc-react-btn:focus-visible { outline: 2px solid var(--color-maria-blue); outline-offset: 2px; }
.nc-react-count {
    font-family: var(--font-body); font-size: .82rem; font-weight: 600;
    color: var(--color-text-muted); min-width: .5ch;
}
.nc-react-btn.is-mine { background: #EAF1FB; border-color: var(--color-maria-blue); }
.nc-react-btn.is-mine .nc-react-count { color: var(--color-maria-blue); }
.nc-react-btn[disabled] { opacity: .55; cursor: wait; }

/* ── forms ─────────────────────────────────────────────────── */
.nc-form { display: flex; flex-direction: column; gap: .7rem; margin-bottom: var(--spacing-lg); }
.nc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.nc-form input[type="text"],
.nc-form input[type="email"],
.nc-form textarea {
    width: 100%; box-sizing: border-box;
    font-family: var(--font-body); font-size: .95rem; color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-cream-dark); border-radius: var(--radius-md);
    padding: .7rem .85rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.nc-form textarea { min-height: 110px; resize: vertical; line-height: 1.65; }
.nc-form input:focus, .nc-form textarea:focus {
    outline: none; border-color: var(--color-maria-blue);
    box-shadow: 0 0 0 3px rgba(30, 77, 140, .12);
}
.nc-form input:disabled { background: var(--color-cream); color: var(--color-text-muted); }
.nc-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.nc-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.nc-anon { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--color-text-light); cursor: pointer; }
.nc-anon input { width: 16px; height: 16px; accent-color: var(--color-maria-blue); }
.nc-send {
    font-family: var(--font-body); font-size: .82rem; font-weight: 600; letter-spacing: .6px;
    text-transform: uppercase; color: var(--color-white); background: var(--color-maria-blue);
    border: none; border-radius: var(--radius-md); padding: .8rem 1.5rem; min-height: 44px;
    cursor: pointer; transition: background .18s ease;
}
.nc-send:hover:not(:disabled) { background: #163D6E; }
.nc-send:disabled { opacity: .65; cursor: not-allowed; }
.nc-note { font-size: .82rem; line-height: 1.6; color: var(--color-text-muted); margin: 0; }
.nc-note a { color: var(--color-maria-blue); text-decoration: underline; text-underline-offset: 2px; }

.nc-msg { font-size: .92rem; line-height: 1.6; border-radius: var(--radius-md); padding: .7rem .9rem; margin: 0; display: none; }
.nc-msg.show { display: block; }
.nc-msg.error { background: #FDECEC; border: 1px solid #F3C0C0; color: #8A1C1C; }
.nc-msg.success { background: #E9F6EC; border: 1px solid #BFE3C8; color: #1C6B31; }

/* ── the thread ────────────────────────────────────────────── */
.nc-count { font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--color-maria-blue); margin: 0 0 var(--spacing-md); }
.nc-empty { background: var(--color-cream); border-radius: var(--radius-md); padding: 1.25rem; text-align: center; color: var(--color-text-muted); font-size: .95rem; }

.nc-item { border-top: 1px solid var(--color-cream-dark); padding-top: var(--spacing-md); margin-top: var(--spacing-md); }
.nc-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.nc-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; margin-bottom: .4rem; }
.nc-item-name { font-family: var(--font-heading); font-size: 1.12rem; font-weight: 600; color: var(--color-maria-blue); }
.nc-item-date { font-size: .78rem; letter-spacing: .5px; text-transform: uppercase; color: var(--color-text-muted); }
.nc-item-msg { font-size: 1rem; line-height: 1.75; color: var(--color-text-light); margin: 0 0 .6rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.nc-item-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.nc-reply-toggle {
    background: none; border: none; padding: .5rem 0; min-height: 44px; cursor: pointer;
    font-family: var(--font-body); font-size: .82rem; font-weight: 600; letter-spacing: .5px;
    text-transform: uppercase; color: var(--color-maria-blue);
}
.nc-reply-toggle:hover { color: var(--color-gold); }
.nc-reply-toggle:focus-visible { outline: 2px solid var(--color-maria-blue); outline-offset: 2px; }

/* replies sit in an indented rail rather than a nested card, so a long thread
   does not staircase off the right edge on a phone */
.nc-replies { margin: .75rem 0 0 0; padding-left: clamp(.9rem, 3vw, 1.5rem); border-left: 2px solid var(--color-cream-dark); }
.nc-replies .nc-item { border-top: none; padding-top: 0; margin-top: var(--spacing-md); }
.nc-replies .nc-item:first-child { margin-top: 0; }
.nc-replies .nc-item-name { font-size: 1rem; }
.nc-replies .nc-item-msg { font-size: .95rem; }
.nc-reply-form { display: none; margin-top: .8rem; }
.nc-reply-form.open { display: flex; }

@media (max-width: 600px) {
    .nc-form-row { grid-template-columns: 1fr; }
    .nc-form-actions { justify-content: stretch; }
    .nc-send { width: 100%; }

    /* At 390px the five reactions were 8px too wide and the last one dropped
       to a line of its own. Trim the horizontal padding, not the 44px height:
       the row has to stay one row, and the tap target has to stay a tap target. */
    .nc-reactions { gap: .3rem; }
    .nc-react-btn { padding: 0 .45rem; font-size: 1rem; }
    .nc-article-react { padding: .8rem .75rem; }
}
