/* /training — the workshop-only layer.
 *
 * Loads AFTER css/course-standard.css and only ADDS: the class grid on the hub,
 * the round rows, the agenda and the FAQ. Everything else on these pages (nav,
 * hero, sections, buttons, pricing cards, colour tokens, type) comes from the
 * course design system, so the two surfaces cannot drift apart.
 *
 * Tokens used here are the ones that file defines: --ink, --muted, --line,
 * --surface, --primary, --cta, --shadow-*. The one exception is the gold used
 * as TEXT: the brand gold is only ~2.4:1 on white, so small type set in it reads
 * as decoration rather than words. --tw-gold-ink is the same hue pushed to 5.3:1.
 */

:root { --tw-gold-ink: #8A6518; }

/* ── hub: the class cards ───────────────────────────────── */
.tw-class-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 24px; margin-top: 26px;
}
.tw-class-card { display: flex; flex-direction: column; transition: transform .4s ease, box-shadow .4s ease; }
.tw-class-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tw-class-card .std-pricing-body { display: flex; flex-direction: column; flex: 1; }
/* price → meta → next round → buttons sit on the card floor, so the rows line
   up across cards even when one card has no "จบวันแล้วได้" box above them */
.tw-class-card .std-price-stack { margin-top: auto; }
.tw-class-media { display: block; min-height: 168px; background-size: cover; background-position: center; position: relative; }
.tw-class-title { font-size: 1.12rem; line-height: 1.45; margin: 0 0 10px; }
.tw-class-title a { color: var(--ink); text-decoration: none; }
.tw-class-title a:hover { color: var(--primary); }

.tw-deliver {
    background: var(--primary-soft, #EFF6FF); border-radius: 10px; padding: 11px 14px;
    font-size: .9rem; color: var(--ink-soft); margin: 0 0 14px;
}
.tw-deliver i { color: var(--tw-gold-ink); margin-right: 6px; }

.tw-per { color: var(--muted); font-size: .86rem; margin-left: 4px; }

.tw-nextline { font-size: .88rem; color: var(--muted); margin: 14px 0 16px; }
.tw-nextline i { color: var(--tw-gold-ink); margin-right: 4px; }
.tw-nextline strong { color: var(--ink); }

.tw-seats { font-weight: 700; color: var(--tw-gold-ink); white-space: nowrap; }
.tw-seats.low { color: var(--danger, #DC2626); }

/* ── rounds ─────────────────────────────────────────────── */
.tw-round {
    display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cta);
    border-radius: 14px; padding: 18px 22px; margin-bottom: 12px;
    transition: box-shadow .3s ease, transform .3s ease;
}
.tw-round:hover { box-shadow: var(--shadow-md); transform: translateX(3px); }
.tw-round .d { font-weight: 700; color: var(--ink); font-size: 1.04rem; }
.tw-round .m { font-size: .86rem; color: var(--muted); margin-top: 2px; }
.tw-round-act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ── the day's topics ───────────────────────────────────── */
.tw-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; }
.tw-topic {
    display: flex; gap: 15px; align-items: flex-start; background: var(--surface);
    border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
    transition: border-color .3s ease, box-shadow .3s ease;
}
.tw-topic:hover { border-color: rgba(200,162,74,.55); box-shadow: var(--shadow-sm); }
/* Gold marks the LIVE DAY, blue marks the ONLINE COURSE. The two numbered lists
   on this page — the day's topics and the bundled curriculum — were identical
   blue squares, so at a glance they read as one long list of the same thing.
   Colour now carries the difference before any of the words do. */
.tw-topic .n {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(200,162,74,.14); border: 1px solid rgba(200,162,74,.32);
    color: var(--tw-gold-ink); font-weight: 800; font-size: .84rem;
}
.tw-topic:hover .n { background: rgba(200,162,74,.22); }
.tw-topic strong { display: block; color: var(--ink); font-size: .99rem; line-height: 1.5; }
.tw-topic p { margin: 4px 0 0; color: var(--muted); font-size: .89rem; line-height: 1.75; }

/* ── bundled course curriculum ──────────────────────────── */
.tw-cur-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px;
    background: var(--line); border: 1px solid var(--line); border-radius: 14px;
    overflow: hidden; margin: 22px 0 20px;
}
.tw-cur-stats > div { background: var(--surface); padding: 16px 18px; text-align: center; }
.tw-cur-stats b { display: block; font-size: 1.45rem; color: var(--primary); line-height: 1.2; }
.tw-cur-stats span { font-size: .78rem; color: var(--muted); }

/* The modules themselves are .std-module from the course design system — this
   only stacks them into one card and marks the bonus ones. */
.tw-cur-list .std-module { margin-bottom: 10px; }
.tw-cur-mod.is-bonus .std-module-num { background: rgba(200,162,74,.18); color: var(--tw-gold-ink); }
.tw-cur-tag {
    display: inline-block; margin-left: 8px; background: rgba(200,162,74,.14); color: var(--tw-gold-ink);
    border-radius: 100px; padding: 1px 10px; font-size: .72rem; font-weight: 700; vertical-align: middle;
}
.tw-cur-note { margin-top: 16px; font-size: .88rem; color: var(--muted); }

/* ── agenda ─────────────────────────────────────────────── */
.tw-agenda { border-left: 2px solid var(--line); padding-left: 26px; margin-top: 24px; }
.tw-agenda .item { position: relative; padding-bottom: 24px; }
.tw-agenda .item:last-child { padding-bottom: 0; }
.tw-agenda .item::before {
    content: ''; position: absolute; left: -33px; top: 8px; width: 11px; height: 11px; border-radius: 50%;
    background: var(--cta); box-shadow: 0 0 0 4px var(--bg, #FAFAF7), 0 0 0 6px rgba(200,162,74,.25);
}
.tw-agenda .t { font-weight: 700; color: var(--ink); font-size: .98rem; }
.tw-agenda .b { color: var(--muted); font-size: .93rem; }

/* ── testimonials ───────────────────────────────────────── */
.tw-reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-top: 24px; }
.tw-review {
    margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    padding: 24px 24px 20px; position: relative; display: flex; flex-direction: column;
}
.tw-review::before {
    content: '”'; position: absolute; top: 4px; right: 20px; font-family: Georgia, serif;
    font-size: 3.4rem; line-height: 1; color: rgba(200,162,74,.28);
}
.tw-review blockquote { margin: 0 0 16px; font-size: .95rem; line-height: 1.9; color: var(--ink-soft); }
.tw-review figcaption { margin-top: auto; font-size: .85rem; }
.tw-review .who { display: block; font-weight: 700; color: var(--ink); }
.tw-review .meta { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.tw-review .meta .ok { color: #167A4B; font-weight: 700; }
.tw-review figcaption a { display: inline-block; margin-top: 8px; color: var(--primary); font-weight: 700; text-decoration: none; }
.tw-review figcaption a:hover { text-decoration: underline; }

/* ── faq ────────────────────────────────────────────────── */
.tw-faq {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    margin-bottom: 10px; overflow: hidden; transition: border-color .3s, box-shadow .3s;
}
.tw-faq[open] { border-color: rgba(200,162,74,.5); box-shadow: var(--shadow-sm); }
.tw-faq summary {
    padding: 17px 22px; cursor: pointer; list-style: none; font-weight: 700; color: var(--ink);
    font-size: .97rem; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.tw-faq summary::-webkit-details-marker { display: none; }
.tw-faq summary::after { content: '+'; color: var(--tw-gold-ink); font-size: 1.3rem; line-height: 1; }
.tw-faq[open] summary::after { content: '−'; }
.tw-faq .a { padding: 0 22px 18px; color: var(--muted); font-size: .94rem; line-height: 1.85; }

/* The catch-all under the list — opens the ask dialog (partials/ask_modal.php)
   so a question the FAQ doesn't answer still has somewhere to go. */
.tw-faq-more { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .93rem; }
.tw-faq-ask {
    padding: 0; background: none; border: 0; cursor: pointer;
    font: inherit; font-weight: 700; color: var(--tw-gold-ink);
    text-decoration: underline; text-underline-offset: 3px;
}
.tw-faq-ask:hover { filter: brightness(1.15); }

/* ── the pricing aside must never outgrow the screen ────────
   The course pages put ONE card in this sticky column; the workshop puts two
   packages, a note box and the fine print. A sticky element taller than the
   viewport pins its own overflow out of reach — scrolling moves the page, not
   the pinned column — and the buy button simply becomes unreachable. Static on
   this page: the hero and every round row carry a buy button anyway, so nothing
   is lost by letting the column scroll with the rest. */
.std-aside { position: static; }

/* ── party note on the group package ────────────────────── */
.tw-note-label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink); margin: 4px 0 6px; }
.tw-note {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    font-family: inherit; font-size: .88rem; color: var(--ink); background: var(--surface);
    resize: vertical; margin-bottom: 12px;
}
.tw-note:focus { outline: 2px solid rgba(200,162,74,.45); outline-offset: 1px; border-color: rgba(200,162,74,.6); }
.tw-party-hint { margin: 10px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.7; }
.tw-detail-btn { margin-top: 10px; }

/* ── pricing aside extras ───────────────────────────────── */
.tw-pack-name { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.tw-card-solo { margin-top: 18px; }
/* Now a <button> (it opens the ask dialog, it doesn't navigate). Buttons bring
   their own background, 'outset' border and shrink-to-fit width, so reset those
   or it renders as a raw grey OS button instead of the quiet text link it is. */
.tw-ask {
    display: block; width: 100%;
    -webkit-appearance: none; appearance: none;
    background: none; border: 0; padding: 0; cursor: pointer;
    text-align: center; margin-top: 12px;
    font-family: inherit; font-size: .86rem; color: var(--muted);
    text-decoration: underline; text-underline-offset: 3px;
}
.tw-ask:hover { color: var(--tw-gold-ink); }
.tw-fineprint { font-size: .82rem; color: var(--muted); margin-top: 16px; line-height: 1.75; }
.tw-buy-error {
    display: none; background: #FEE2E2; color: #991B1B; border-radius: 12px;
    padding: 13px 16px; margin-top: 14px; font-size: .9rem; font-weight: 600;
}

/* ── odds and ends ──────────────────────────────────────── */
.tw-poster-blank { background: linear-gradient(140deg, var(--primary-soft, #EFF6FF), var(--surface)); }
.tw-closing { text-align: center; }
.tw-closing .std-lede { margin-left: auto; margin-right: auto; }

.tw-admin-hint {
    background: #FEF3C7; border: 1px dashed #D97706; color: #92400E; border-radius: 12px;
    padding: 13px 17px; font-size: .86rem; margin: 22px 0 0;
}

.tw-foot {
    border-top: 1px solid var(--line); padding: 28px 0; text-align: center;
    color: var(--muted); font-size: .84rem; background: var(--surface);
}
.tw-foot a { color: var(--muted); }

@media (max-width: 640px) {
    .tw-round { padding: 16px 18px; }
    .tw-round-act { width: 100%; justify-content: space-between; }
}
