/* TESR Academy — course fit card + invitation letter generator (shared by registration pages) */

/* ---------- Fit / sales card ---------- */
.fit-lead{ font-family:var(--tsx-head); font-weight:600; font-size:clamp(1.12rem,1rem + .6vw,1.35rem); line-height:1.5; color:#fff; margin:4px 0 14px; }
.fit-chips{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; padding:0; list-style:none; }
.fit-chips li{ border:1px solid rgba(201,168,76,.45); color:var(--tesr-gold); background:rgba(201,168,76,.08); padding:4px 12px; font-size:.92rem; font-weight:500; }
.fit-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.fit-grid .fit-col:first-child{ grid-column:1 / -1; }
.fit-col{ background:rgba(0,0,0,.55); border:1px solid rgba(237,235,230,.12); padding:16px 16px 6px; }
.fit-col h3{ font-family:var(--tsx-head); font-weight:700; font-size:1.02rem; color:var(--tesr-gold); margin:0 0 8px; }
.fit-col ul{ margin:0; padding-left:1.1em; }
.fit-col li{ color:#F5F3EE; margin:0 0 8px; line-height:1.6; }
.fit-col li::marker{ color:var(--tesr-red-light); }
.fit-buy{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin-top:18px; padding:16px; background:rgba(139,0,0,.22); border-left:3px solid var(--tesr-red-light); }
.fit-price{ color:#F5F3EE; line-height:1.5; }
.fit-price b{ font-family:var(--tsx-num); font-weight:500; color:#fff; font-size:1.35rem; }
.fit-price s{ color:#C9CDD4; }
.fit-price small{ display:block; color:#D5D8DE; font-size:.85rem; }
.fit-cta{ display:flex; flex-wrap:wrap; gap:10px; }
.tsx-btn{ display:inline-block; text-decoration:none; font-family:var(--tsx-head); font-weight:700; font-size:1rem; padding:12px 22px; border:1px solid var(--tesr-gold); cursor:pointer; line-height:1.3;
  clip-path:polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,10px 100%,0 calc(100% - 10px)); }
.tsx-btn.solid{ background:var(--tesr-gold); color:#000; }
.tsx-btn.solid:hover{ background:#E0C26A; }
.tsx-btn.ghost{ background:transparent; color:var(--tesr-gold); }
.tsx-btn.ghost:hover{ background:rgba(201,168,76,.12); }
.tsx-btn:focus-visible{ outline:2px solid #fff; outline-offset:3px; }
@media (max-width:760px){
  .fit-grid{ grid-template-columns:1fr; }
  .fit-buy{ flex-direction:column; align-items:stretch; }
  .fit-cta .tsx-btn{ flex:1 1 100%; text-align:center; }
}

/* ---------- Invitation card ---------- */
.inv-lead{ color:#F5F3EE; margin:0 0 14px; }
.inv-check{ display:flex; align-items:center; gap:12px; padding:14px 16px; background:rgba(201,168,76,.08); border:1px solid rgba(201,168,76,.4); cursor:pointer; font-family:var(--tsx-head); font-weight:600; font-size:1.05rem; color:#fff; margin:0; }
.inv-check input{ width:22px; height:22px; accent-color:#C9A84C; flex:0 0 auto; margin:0; }
.inv-fields{ margin-top:6px; }
.inv-fields[hidden]{ display:none; }
.inv-row{ display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
@media (max-width:640px){ .inv-row{ grid-template-columns:1fr; } }
.inv-fields input[type=date]{ width:100%; background:rgba(255,255,255,.05); border:1px solid rgba(237,235,230,.16); color:#fff; padding:11px 14px; font:inherit; color-scheme:dark; box-sizing:border-box; }
.inv-fields input[type=date]:focus{ border-color:var(--tesr-gold); outline:none; box-shadow:0 0 0 3px rgba(201,168,76,.18); }
.inv-hint{ color:#C9CDD4; font-size:.88rem; margin:4px 0 0; }
.inv-era{ display:flex; gap:18px; flex-wrap:wrap; margin:6px 0 0; }
.inv-era label{ display:flex; align-items:center; gap:8px; font-weight:400; cursor:pointer; margin:0; }
.inv-era input{ accent-color:#C9A84C; width:18px; height:18px; margin:0; }
.inv-actions{ margin-top:20px; }
.inv-actions .tsx-btn{ width:100%; text-align:center; font-size:1.08rem; padding:15px; }
.inv-actions .tsx-btn[disabled]{ background:#3a3a3a; border-color:#3a3a3a; color:#999; cursor:wait; }
#invStatus{ margin-top:10px; min-height:1.4em; color:#F5F3EE; }
#invStatus.err{ color:#ff8a8a; }
#invStatus.ok{ color:#86e0a6; }

/* ---------- Letter pages (rendered off-screen, captured to PDF) ---------- */
#invStage{ position:absolute; left:-12000px; top:0; width:794px; z-index:-1; }
.ivp{ width:794px; height:1123px; background:#fff; color:#111; position:relative; overflow:hidden; box-sizing:border-box;
  padding:46px 72px 70px 86px; font-family:"Sarabun",sans-serif; font-size:15.5px; line-height:1.72; letter-spacing:0; }
.ivp *{ box-sizing:border-box; }
.ivp-head{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; padding-bottom:10px; border-bottom:2px solid #8B0000; position:relative; }
.ivp-head::after{ content:""; position:absolute; left:0; right:0; bottom:-6px; height:1px; background:#C9A84C; }
.ivp-head img{ width:66px; height:auto; }
.ivp-co{ line-height:1.35; }
.ivp-co b{ display:block; font-size:19px; font-weight:700; color:#000; }
.ivp-co > span{ display:block; font-size:12.5px; color:#333; }
.ivp-co em{ font-style:normal; color:#8B0000; font-weight:600; }
.ivp-meta{ display:flex; justify-content:space-between; margin-top:22px; font-size:15px; }
.ivp-date{ text-align:right; }
.ivp-kv{ display:grid; grid-template-columns:92px 1fr; gap:2px 8px; margin-top:16px; }
.ivp-kv b{ font-weight:700; }
.ivp-body{ margin-top:16px; }
.ivp-body p{ margin:0 0 10px; text-indent:3.2em; text-align:left; }
.ivp .nw{ white-space:nowrap; }
.ivp-names{ margin:2px 0 12px 3.2em; padding:0; list-style:none; }
.ivp-names li{ margin:0; }
.ivp-sign{ margin-left:auto; width:300px; text-align:center; margin-top:18px; position:relative; }
.ivp-sigbox{ height:86px; position:relative; display:flex; align-items:flex-end; justify-content:center; }
.ivp-sigbox .sig{ max-height:78px; max-width:220px; position:relative; z-index:2; }
.ivp-sigbox .seal{ position:absolute; left:-150px; top:-6px; width:96px; opacity:.92; z-index:1; transform:rotate(-4deg); }
.ivp-sigline{ letter-spacing:0; color:#555; }
.ivp-foot{ position:absolute; left:86px; right:72px; bottom:26px; border-top:1px solid #C9A84C; padding-top:7px; display:flex; justify-content:space-between; gap:16px; font-size:11px; line-height:1.45; color:#444; }
.ivp-foot b{ color:#8B0000; font-weight:600; }
.ivp h2{ font-size:20px; font-weight:700; color:#000; margin:20px 0 4px; }
.ivp h3{ font-size:16px; font-weight:700; color:#8B0000; margin:16px 0 6px; padding-bottom:3px; border-bottom:1px solid #e3d9bf; }
.ivp .sub{ color:#444; margin:0 0 6px; }
.ivp ul.dots{ margin:0; padding-left:1.25em; }
.ivp ul.dots li{ margin:0 0 2px; }
.ivp table{ width:100%; border-collapse:collapse; font-size:14px; line-height:1.5; }
.ivp table.info td{ border:1px solid #d9d2c2; padding:6px 10px; vertical-align:top; }
.ivp table.info td:first-child{ width:150px; background:#f7f3ea; font-weight:600; }
.ivp table.sch{ margin-bottom:10px; }
.ivp table.sch th{ background:#8B0000; color:#fff; text-align:left; font-weight:600; padding:5px 10px; font-size:14px; }
.ivp table.sch td{ border-bottom:1px solid #e6e0d2; padding:3px 10px; }
.ivp table.sch td:first-child{ width:132px; white-space:nowrap; color:#333; }
.ivp table.sch tr.brk td{ color:#777; }
.ivp .two{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.ivp .pay{ border:1px solid #C9A84C; background:#fbf8f0; padding:10px 14px; font-size:14px; line-height:1.6; }
.ivp .tag{ display:inline-block; background:#8B0000; color:#fff; font-size:12px; padding:1px 10px; margin-bottom:4px; }

.ivp-head.mini{ flex-direction:row; justify-content:center; text-align:left; gap:12px; padding-bottom:8px; }
.ivp-head.mini img{ width:40px; }
.ivp-head.mini .ivp-co b{ font-size:16px; }

/* ---------- LINE contact ---------- */
.line-fab{ position:fixed; right:18px; bottom:18px; z-index:50; display:flex; align-items:center; gap:10px; text-decoration:none; }
.line-fab .lf-label{ background:#fff; color:#0b0b0b; font-family:var(--tsx-head); font-weight:700; font-size:.95rem; line-height:1.25; padding:9px 14px; border-radius:999px; box-shadow:0 8px 24px rgba(0,0,0,.45); white-space:nowrap; }
.line-fab .lf-label small{ display:block; font-family:"IBM Plex Sans Thai",sans-serif; font-weight:500; font-size:.75rem; color:#06803a; }
.line-fab .lf-btn{ width:62px; height:62px; border-radius:50%; background:#06C755; display:grid; place-items:center; box-shadow:0 10px 28px rgba(6,199,85,.45), 0 0 0 4px rgba(255,255,255,.9); position:relative; flex:0 0 auto; }
.line-fab .lf-btn::before{ content:""; position:absolute; inset:-4px; border-radius:50%; border:2px solid #06C755; animation:lfPulse 2.4s ease-out infinite; }
.line-fab .lf-btn svg{ width:30px; height:30px; }

.line-fab:hover .lf-btn{ background:#05b04b; }
.line-fab:focus-visible{ outline:2px solid #fff; outline-offset:4px; border-radius:999px; }
@keyframes lfPulse{ 0%{ transform:scale(1); opacity:.8; } 100%{ transform:scale(1.45); opacity:0; } }
@media (max-width:560px){ .line-fab{ right:12px; bottom:12px; } .line-fab .lf-label{ font-size:.85rem; padding:7px 12px; animation:lfHide .5s ease 6s forwards; } .line-fab .lf-btn{ width:56px; height:56px; } }
@media (prefers-reduced-motion:reduce){ .line-fab .lf-btn::before{ animation:none; opacity:0; } }
.line-btn{ display:inline-flex; align-items:center; gap:10px; margin-top:10px; background:#06C755; color:#fff !important; text-decoration:none; font-family:var(--tsx-head); font-weight:700; padding:10px 18px; border-radius:999px; }
.line-btn:hover{ background:#05b04b; }
.line-btn svg{ width:20px; height:20px; }
.container{ padding-bottom:110px; }
@keyframes lfHide{ to{ opacity:0; visibility:hidden; transform:translateX(10px); } }

/* ---------- Group registration ---------- */
.att-lead{ color:#F5F3EE; margin:0 0 12px; }
.att-list{ display:flex; flex-direction:column; gap:14px; }
fieldset.att{ position:relative; margin:0; border:1px solid rgba(201,168,76,.35); background:rgba(0,0,0,.45); padding:6px 16px 16px; min-width:0; }
fieldset.att legend{ font-family:var(--tsx-head); font-weight:700; color:var(--tesr-gold); padding:0 8px; font-size:1.02rem; }
fieldset.att legend small{ color:#D5D8DE; font-weight:500; }
fieldset.att label small.opt{ color:#C9CDD4; font-weight:400; font-size:.85rem; }
.att-del{ position:absolute; top:8px; right:10px; background:transparent; border:1px solid rgba(255,123,123,.6); color:#ff9d9d; font:600 .85rem var(--tsx-head); padding:3px 12px; cursor:pointer; }
.att-del:hover{ background:rgba(255,123,123,.12); }
.att-add{ width:100%; margin:12px 0 4px; padding:13px; background:rgba(201,168,76,.06); border:1px dashed rgba(201,168,76,.7); color:var(--tesr-gold); font:700 1.02rem var(--tsx-head); cursor:pointer; }
.att-add:hover{ background:rgba(201,168,76,.14); }
.att-add[hidden]{ display:none; }
.pay-total{ margin:14px 0 6px; padding:14px 16px; background:rgba(139,0,0,.24); border-left:3px solid var(--tesr-gold); color:#F5F3EE; }
.pay-total .pt-head{ font-family:var(--tsx-head); font-weight:700; color:#fff; margin-bottom:6px; }
.pay-total .pt-head b{ color:var(--tesr-gold); }
.pay-total .pt-row{ display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.pay-total .pt-row b{ font-family:var(--tsx-num); font-weight:500; font-size:1.25rem; color:#fff; white-space:nowrap; }
.pay-total .pt-row.muted{ color:#D5D8DE; }
.pay-total .pt-row.muted b{ font-size:1rem; color:#E6E8EC; }
.pay-total .pt-note{ font-size:.85rem; color:#D5D8DE; margin-top:6px; }
.inv-open{color:#C9A84C;font-weight:700;text-decoration:underline}
