/* STS Workshops — single workshop page + card grids. Uses site tokens when
   present (var(--x, fallback)) so it also works standalone. */
/* The tally and the vote button also carry the tokens: both render outside the
   .sts-wshop / .sts-wshop-grid wrappers (the tally is a shortcode dropped on any
   page, the button can be placed anywhere), and without them every var(--_line) /
   var(--_surface) below resolves to nothing — borders and backgrounds vanish. */
.sts-wshop, .sts-wshop-grid, .sts-modal, .sts-wtally, .sts-wvote{
  --_accent:var(--accent,#2f7d4f); --_deep:var(--accent-deep,#1b5233);
  --_surface:var(--surface,#fff); --_surface2:var(--surface-2,#e9efe6);
  --_ink:var(--ink,#161d18); --_soft:var(--ink-soft,#4e5a51); --_faint:var(--ink-faint,#84918a);
  --_line:var(--line,#dce4d9);
  --_sans:"Helvetica Neue",Helvetica,"Segoe UI",Roboto,Arial,system-ui,sans-serif;
  font-family:var(--_sans);color:var(--_ink)}
.sts-wshop *,.sts-wshop-grid *{box-sizing:border-box}

/* ---------- single workshop ---------- */
.sts-wshop{max-width:820px;margin-inline:auto}
.sts-wshop-badges{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.sts-wshop-badge{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#fff;background:var(--_accent);padding:5px 11px;border-radius:999px}
.sts-wshop-badge-ce{background:var(--_deep)}
.sts-wshop-title{font-size:clamp(26px,4.5vw,40px);font-weight:800;letter-spacing:-.02em;line-height:1.1;margin:0 0 .3em;color:var(--_ink)}
.sts-wshop-subtitle{font-size:18px;color:var(--_soft);margin:0 0 18px}
.sts-wshop-facts{display:flex;flex-wrap:wrap;gap:12px 28px;padding:16px 0;border-top:1px solid var(--_line);border-bottom:1px solid var(--_line)}
.sts-wshop-fact{display:flex;flex-direction:column;gap:2px}
.sts-wshop-fact-k{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--_faint)}
.sts-wshop-fact-v{font-size:15px;color:var(--_ink);font-weight:600}
.sts-wshop-fact-note{font-weight:500;color:var(--_soft)}
.sts-wshop-fact-note::before{content:"— "}

/* cost + cart (pinned, prominent) */
.sts-wshop-cost{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;margin:22px 0;padding:20px 22px;background:linear-gradient(120deg,color-mix(in srgb,var(--_accent) 10%,var(--_surface)),var(--_surface));border:1px solid var(--_line);border-radius:16px}
.sts-wshop-price{font-size:28px;font-weight:800;letter-spacing:-.01em;color:var(--_deep)}
.sts-wshop-cart{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sts-wshop-regnote{font-size:15px;font-weight:700;color:var(--_soft);font-style:italic}

/* partner / joint registration: the button leaves the site, so say so */
.sts-wshop-partner-btn span[aria-hidden]{margin-left:2px;font-size:.9em}
.sts-wshop-partner-note{flex-basis:100%;margin:4px 0 0;font-size:13px;line-height:1.5;color:var(--_soft)}

/* ---- "vote for your favourite workshop" ---------------------------------- */
.sts-wvote{display:inline-flex;align-items:center;gap:7px;padding:9px 15px;border:1px solid var(--_line);
  border-radius:999px;background:var(--_surface);color:var(--_soft);font:inherit;font-size:14px;font-weight:700;
  line-height:1;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.sts-wvote svg{width:17px;height:17px;flex:none}
.sts-wvote:hover:not(:disabled){border-color:var(--_accent);color:var(--_deep)}
.sts-wvote:disabled{opacity:.6;cursor:default}
.sts-wvote-n{padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--_accent) 14%,transparent);
  color:var(--_deep);font-size:13px;font-variant-numeric:tabular-nums}
/* the chosen favourite — a filled thumb, since only one can be lit at a time */
.sts-wvote.voted{background:color-mix(in srgb,var(--_accent) 16%,var(--_surface));border-color:var(--_accent);color:var(--_deep)}
.sts-wvote.voted svg{fill:currentColor}
.sts-wvote-compact{padding:6px 11px;font-size:13px}
.sts-wvote-compact svg{width:15px;height:15px}

/* running tally */
.sts-wtally{margin:22px 0}
.sts-wtally-total{margin:0 0 16px;font-size:15px;color:var(--_soft)}
.sts-wtally-hint{display:block;margin-top:3px;font-size:13px;opacity:.85}
.sts-wtally-list{list-style:none;margin:0;padding:0;display:grid;gap:12px;counter-reset:sts-wtally}
.sts-wtally-row{display:grid;grid-template-columns:1fr auto;gap:8px 14px;align-items:center;
  padding:14px 16px;background:var(--_surface);border:1px solid var(--_line);border-radius:14px}
.sts-wtally-main{grid-column:1;display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.sts-wtally-title{font-weight:700;color:var(--_ink);text-decoration:none}
.sts-wtally-title:hover{color:var(--_deep);text-decoration:underline}
.sts-wtally-n{font-size:15px;font-weight:800;color:var(--_deep);font-variant-numeric:tabular-nums}
.sts-wtally-bar{grid-column:1;height:7px;border-radius:999px;background:color-mix(in srgb,var(--_line) 60%,transparent);overflow:hidden}
.sts-wtally-bar span{display:block;height:100%;border-radius:999px;background:var(--_accent);transition:width .3s}
.sts-wtally-row .sts-wvote{grid-column:2;grid-row:1/3}
@media(max-width:600px){
  .sts-wtally-row{grid-template-columns:1fr}
  .sts-wtally-row .sts-wvote{grid-column:1;grid-row:auto;justify-self:start}
}

.sts-wshop-brief{font-size:17px;color:var(--_soft);line-height:1.6;margin:18px 0}
.sts-wshop-brief p{margin:0 0 1em}
.sts-wshop-section{margin:26px 0}
.sts-wshop-h{font-size:20px;font-weight:800;letter-spacing:-.01em;margin:0 0 14px;color:var(--_ink)}

/* accordions */
.sts-acc{border:1px solid var(--_line);border-radius:12px;margin:10px 0;background:var(--_surface);overflow:hidden}
.sts-acc>summary{cursor:pointer;list-style:none;padding:16px 20px;font-weight:700;font-size:16px;color:var(--_ink);display:flex;align-items:center;justify-content:space-between}
.sts-acc>summary::-webkit-details-marker{display:none}
.sts-acc>summary::after{content:"+";font-size:20px;color:var(--_accent);font-weight:700;line-height:1}
.sts-acc[open]>summary::after{content:"–"}
.sts-acc>summary:hover{color:var(--_accent)}
.sts-acc-body{padding:0 20px 18px;color:var(--_soft);font-size:15.5px;line-height:1.6}
.sts-acc-body p{margin:0 0 1em}
.sts-acc-body ul,.sts-acc-body ol{padding-left:1.3em;margin:0 0 1em}
.sts-wshop-bring-h{font-size:15px;font-weight:800;color:var(--_ink);margin:0 0 8px}
.sts-wshop-bring-h~.sts-wshop-bring-h{margin-top:16px}

/* itinerary */
.sts-itin-day{margin:0 0 16px}
.sts-itin-day-h{font-size:16px;font-weight:800;color:var(--_ink);margin:0 0 8px}
.sts-itin-day-h span{font-weight:600;color:var(--_faint);font-size:14px}
.sts-itin-slots{list-style:none;margin:0;padding:0}
.sts-itin-slots li{display:flex;gap:14px;padding:8px 0;border-top:1px dashed var(--_line)}
.sts-itin-time{flex:0 0 130px;font-weight:700;color:var(--_deep);font-variant-numeric:tabular-nums}
.sts-itin-topic{color:var(--_soft)}

/* companion */
.sts-wshop-companion{margin:24px 0;padding:16px 20px;border:1px dashed var(--_accent);border-radius:12px;background:color-mix(in srgb,var(--_accent) 6%,var(--_surface))}
.sts-wshop-companion-k{display:block;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--_accent);margin-bottom:4px}
.sts-wshop-companion a{color:var(--_ink);text-decoration:none}
.sts-wshop-companion a:hover{color:var(--_accent)}

/* ---------- card grids ---------- */
.sts-wshop-grid{display:grid;gap:22px;grid-template-columns:1fr}
@media (min-width:560px){.sts-wshop-grid{grid-template-columns:1fr 1fr}}
@media (min-width:880px){.sts-wshop-grid{grid-template-columns:repeat(var(--sts-cols,3),1fr)}}
.sts-wshop-card{display:flex;flex-direction:column;gap:10px;background:var(--_surface);border:1px solid var(--_line);border-radius:16px;padding:22px;box-shadow:0 1px 2px rgba(22,29,24,.04),0 16px 36px -26px rgba(27,82,51,.28)}
.sts-wshop-tag{align-self:flex-start;font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--_accent);background:var(--_surface2);padding:5px 11px;border-radius:999px}
.sts-wshop-card-title{font-size:19px;font-weight:800;line-height:1.25;letter-spacing:-.01em;margin:0}
.sts-wshop-card-title a{color:var(--_ink);text-decoration:none}
.sts-wshop-card-title a:hover{color:var(--_accent)}
.sts-wshop-card-date{font-size:14px;font-weight:700;color:var(--_deep);margin:0}
.sts-wshop-card-sub{font-size:14px;color:var(--_soft);margin:0}
.sts-wshop-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:8px}
.sts-wshop-card-cost{font-weight:800;color:var(--_deep)}

/* ---------- listing page ([sts_workshops]: Running Now / Coming Soon) ---------- */
.sts-wshop-listing{margin:0 0 44px}
.sts-wshop-listing:last-child{margin-bottom:0}
.sts-wshop-listing-h{font-size:23px;font-weight:800;letter-spacing:-.01em;color:var(--_ink);margin:0 0 20px;padding-bottom:10px;border-bottom:2px solid var(--_line)}

/* month grouping inside "Accepting Registration" */
.sts-wshop-month{margin:0 0 28px}
.sts-wshop-month:last-child{margin-bottom:0}
.sts-wshop-month-h{font-size:15px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--_accent);margin:0 0 14px}

/* A run of single-workshop months shares one row, one month per card column,
   so a lone card doesn't strand two empty columns behind it. */
.sts-wshop-monthrow{display:grid;gap:0 22px;grid-template-columns:1fr}
@media (min-width:560px){.sts-wshop-monthrow{grid-template-columns:1fr 1fr}}
@media (min-width:880px){.sts-wshop-monthrow{grid-template-columns:repeat(var(--sts-cols,3),1fr)}}
.sts-wshop-monthrow .sts-wshop-grid{grid-template-columns:1fr}

/* card top row: format tag + primary-instructor avatar */
.sts-wshop-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sts-wshop-card-top:empty{display:none}
.sts-wshop-avatar{flex:0 0 auto;width:48px;height:48px;border-radius:50%;object-fit:cover;background:var(--_surface2);border:2px solid var(--_surface);box-shadow:0 1px 3px rgba(22,29,24,.14)}
.sts-wshop-avatar-silhouette{padding:0;background:transparent;border-color:var(--_surface)}
/* keep the title clear of the top row */
.sts-wshop-card-top + .sts-wshop-card-title{margin-top:2px}

/* ---------- instructor bio: upcoming workshops ---------- */
.sts-inst-workshops{margin:36px 0 0;padding:24px;border:1px solid var(--_line);border-radius:16px;background:var(--_surface2)}
.sts-inst-workshops-h{font-size:19px;font-weight:800;letter-spacing:-.01em;color:var(--_ink);margin:0 0 14px}
.sts-inst-workshops-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.sts-inst-workshop{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:12px 16px;background:var(--_surface);border:1px solid var(--_line);border-radius:12px}
.sts-inst-workshop-link{display:flex;flex-direction:column;gap:2px;text-decoration:none;color:var(--_ink)}
.sts-inst-workshop-link:hover .sts-inst-workshop-title{color:var(--_accent)}
.sts-inst-workshop-title{font-weight:700}
.sts-inst-workshop-date{font-size:13px;color:var(--_deep);font-weight:600}
.sts-inst-workshop-cta{flex:0 0 auto;font-size:13px;font-weight:700;color:var(--_accent);white-space:nowrap}

/* .sts-btn / .sts-btn-solid are owned by the theme's global.css — the plugin
   must NOT restyle them (its tokens aren't in scope outside workshop grids,
   which made the hero + "View all classes" buttons illegible). */
.sts-btn[disabled]{opacity:.6;cursor:default}

/* "Coming Soon" tag beside the format on non-attendable (template) cards */
.sts-wshop-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-width:0}
.sts-wshop-tag-soon{background:var(--_deep);color:#fff}

/* interest button sits on its own row in a Coming Soon card foot */
.sts-wshop-card-foot{flex-wrap:wrap}
.sts-interest-btn{flex:1 1 100%;margin-top:4px;font:inherit;font-size:13.5px;font-weight:700;padding:9px 12px;border-radius:9px;border:1px dashed var(--_accent);background:color-mix(in srgb,var(--_accent) 7%,var(--_surface));color:var(--_deep);cursor:pointer;transition:background .15s}
.sts-interest-btn:hover{background:color-mix(in srgb,var(--_accent) 14%,var(--_surface))}

/* ---------- modal ---------- */
.sts-modal[hidden]{display:none}
.sts-modal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px}
.sts-modal-backdrop{position:absolute;inset:0;background:rgba(18,28,22,.55)}
.sts-modal-box{position:relative;width:100%;max-width:440px;background:var(--_surface);border-radius:16px;padding:28px;box-shadow:0 24px 60px -20px rgba(0,0,0,.5);max-height:90vh;overflow:auto}
.sts-modal-x{position:absolute;top:10px;right:14px;border:0;background:none;font-size:26px;line-height:1;color:var(--_soft);cursor:pointer}
.sts-modal-h{font-size:21px;font-weight:800;margin:0 0 6px;color:var(--_ink)}
.sts-modal-sub{font-size:14px;color:var(--_soft);margin:0 0 18px}
.sts-interest-form label{display:block;font-size:13px;font-weight:700;color:var(--_deep);margin:0 0 12px}
.sts-interest-form label span{font-weight:400;color:var(--_soft)}
.sts-interest-form input,.sts-interest-form textarea{display:block;width:100%;margin-top:5px;padding:9px 11px;border:1px solid var(--_line);border-radius:8px;font:inherit;background:var(--_surface)}
.sts-interest-actions{display:flex;align-items:center;gap:12px;margin-top:4px}
.sts-interest-msg{font-size:13px;font-weight:600}
.sts-interest-msg.is-ok{color:var(--_accent)}
.sts-interest-msg.is-err{color:#b3261e}
.sts-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* small location map, tucked under the Location fact */
.sts-wshop-fact-loc{max-width:100%}
.sts-wshop-map{margin:8px 0 0}
.sts-wshop-map iframe{display:block;width:250px;max-width:100%;height:150px;border:0;border-radius:12px;box-shadow:0 1px 2px rgba(22,29,24,.06),0 10px 24px -18px rgba(27,82,51,.4)}

/* photo gallery (shown near the top, never in an accordion) */
.sts-wshop-gallery{margin:22px 0}
.sts-wshop-gallery .sts-carousel img{max-height:460px;object-fit:cover}
.sts-wshop-gallery-plain img{display:block;width:100%;height:auto;border-radius:14px;margin:0 0 12px}

/* single-instructor lead: description on the left, compact instructor on the right */
.sts-wshop-lead{display:flex;flex-wrap:wrap;gap:26px;align-items:flex-start;margin:18px 0}
.sts-wshop-lead .sts-wshop-brief{flex:1 1 340px;margin:0}
.sts-wshop-inst-compact{flex:0 0 180px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:16px;border:1px solid var(--_line);border-radius:14px;background:var(--_surface2)}
.sts-wshop-inst-photo{width:120px;height:150px;object-fit:cover;border-radius:10px}
.sts-wshop-inst-meta{display:flex;flex-direction:column;gap:2px;align-items:center}
.sts-wshop-inst-k{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--_faint)}
.sts-wshop-inst-name{font-size:15px;color:var(--_ink)}
.sts-wshop-inst-creds{font-size:12.5px;color:var(--_soft)}
.sts-wshop-inst-compact .sts-link{margin-top:4px;font-size:13px;font-weight:700;color:var(--_accent);text-decoration:none}
@media (max-width:560px){.sts-wshop-inst-compact{flex-basis:100%;flex-direction:row;text-align:left}.sts-wshop-inst-meta{align-items:flex-start}}
/* "Instructor TBD" placeholder: silhouette shown contained (not cropped) on a muted tile */
.sts-wshop-inst-tbd .sts-wshop-inst-photo{object-fit:contain;padding:24px;background:var(--_surface);opacity:.55}
.sts-wshop-inst-tbd .sts-wshop-inst-name{color:var(--_soft)}

/* cart area: allow the add-to-cart buttons + cart summary to wrap tidily */
.sts-wshop-cost{align-items:flex-start}
.sts-wshop-cart{flex-wrap:wrap;gap:10px}
.sts-wshop-cart .wspsc_add_cart_submit{margin:2px}

/* ---- language switch (only rendered when a translation exists) ----------- */
/* Real links, not buttons: each language has its own address, so it can be sent to
   someone and it works with scripts off. Placed above the title because a reader who
   cannot read the page needs this before they read the page. */
.sts-wlang{display:inline-flex;gap:3px;padding:3px;margin:0 0 18px;border-radius:999px;
  background:var(--surface-2,#e9efe6);border:1px solid var(--line,#dce4d9)}
.sts-wlang-btn{display:inline-block;font-size:13px;font-weight:700;line-height:1;
  padding:8px 16px;border-radius:999px;text-decoration:none;border:0;
  color:var(--ink-soft,#4e5a51);transition:background .13s ease,color .13s ease}
.sts-wlang-btn:hover{color:var(--accent-deep,#1b5233)}
.sts-wlang-btn.active{background:var(--accent,#2f7d4f);color:#fff}
.sts-wlang-btn:focus-visible{outline:2.5px solid var(--accent,#2f7d4f);outline-offset:2px}

/* Postponed: still listed so people can say they are interested, visibly not bookable.
   A fixed amber that reads in both light and dark, rather than a theme token that might not. */
.sts-wshop-tag-postponed,.sts-wshop-badge-postponed{background:#b7791f;color:#fff}
.sts-wshop-postponed-note{margin:0 0 10px;font-size:14.5px;line-height:1.5}
/* Language of instruction, shown only when it is not English. */
.sts-wshop-tag-lang{background:var(--_deep);color:#fff;letter-spacing:.04em}
