/* ==========================================================================
   JobTetris - spec widgets (jb-widgets.css)
   Carousel · compact cards · latest tiles · search bars · board designs · team v2
   Colours reference the injected --jt-color-* / --jt-btn-* custom properties,
   falling back to the JobTetris palette. Namespaced under jt-/jb-.
   ========================================================================== */

.jt-w-card,
.jt-carousel,
.jt-latest,
.jt-search,
.jt-team {
  font-family: var(--jt-font, 'Montserrat', system-ui, sans-serif);
  --jt-w-border: var(--jt-color-border, #E3E4F2);
  --jt-w-accent: var(--jt-color-accent, #1D1F7B);
  --jt-w-blue:   #005AD2;
  --jt-w-teal:   var(--jt-color-accent-soft, #2DD3BE);
  --jt-w-muted:  var(--jt-color-muted, #7A7CB0);
  --jt-w-ink:    var(--jt-color-text, #4A4C8A);
  box-sizing: border-box;
}
.jt-w-card *, .jt-carousel *, .jt-latest *, .jt-search *, .jt-team * { box-sizing: border-box; }

.jt-btn-icon { flex-shrink: 0; }

/* ─── Shared compact job card (carousel / latest carousel) ─────────────────── */
.jt-w-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--jt-w-border);
  border-radius: 12px;
  background: var(--jt-color-surface, #fff);
}
.jt-w-card__cat { font-size: 11px; font-weight: 600; color: var(--jt-w-accent); }
.jt-w-card__sub { color: var(--jt-w-muted); font-weight: 600; }
.jt-w-card__title { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.jt-w-card__title a { color: var(--jt-w-blue); text-decoration: none; }
.jt-w-card__title a:hover { text-decoration: underline; }
.jt-w-card__meta {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--jt-w-muted);
}
.jt-w-card__blurb { margin: 0; font-size: 12px; line-height: 1.55; color: var(--jt-w-ink); flex: 1; }
.jt-w-card__salary { font-size: 12px; font-weight: 600; color: #0E7B6C; }
.jt-w-card__apply {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 2px;
}

/* ─── Carousel shell ───────────────────────────────────────────────────────── */
.jt-carousel { position: relative; }
.jt-carousel:focus-visible { outline: 2px solid var(--jt-w-blue); outline-offset: 4px; border-radius: 8px; }
.jt-carousel__viewport { overflow: hidden; }
.jt-carousel__track { display: flex; gap: 16px; }
.jt-carousel__slide { display: flex; }
.jt-carousel__slide > * { width: 100%; }

/* Manual mode - index-driven transform (set by jb-widgets.js) */
.jt-carousel--manual .jt-carousel__track { transition: transform 300ms cubic-bezier(0.22, 0.8, 0.35, 1); will-change: transform; }
.jt-carousel--manual .jt-carousel__slide {
  flex: 0 0 calc((100% - (var(--jt-visible, 4) - 1) * 16px) / var(--jt-visible, 4));
}

/* Manual nav arrows */
.jt-carousel__nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.jt-carousel__arrow {
  width: 34px; height: 34px; border-radius: var(--jt-btn-radius, 999px);
  border: 1px solid var(--jt-w-border); background: #fff; color: var(--jt-w-accent);
  font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 150ms ease, opacity 150ms ease;
}
.jt-carousel__arrow:hover { background: #F4F5FC; }
.jt-carousel__arrow--next { border-color: transparent; background: var(--jt-color-accent-soft, #2DD3BE); color: var(--jt-w-accent); font-weight: 700; }
.jt-carousel__arrow:disabled { opacity: 0.4; cursor: default; }
.jt-carousel__arrow:focus-visible { outline: 2px solid var(--jt-w-blue); outline-offset: 2px; }

/* Auto marquee mode */
@keyframes jtMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.jt-carousel--auto .jt-carousel__track {
  width: max-content;
  animation: jtMarquee var(--jt-marquee-duration, 40s) linear infinite;
}
.jt-carousel--auto .jt-carousel__slide { flex: 0 0 260px; }
.jt-carousel--auto.jt-carousel--paused .jt-carousel__track,
.jt-carousel--auto.jt-carousel--offscreen .jt-carousel__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .jt-carousel--auto .jt-carousel__track { animation: none; }
  .jt-carousel--manual .jt-carousel__track { transition: none; }
}

@media (max-width: 768px) {
  .jt-carousel--manual .jt-carousel__slide { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 520px) {
  .jt-carousel--manual .jt-carousel__slide { flex-basis: 82%; }
  .jt-carousel--auto .jt-carousel__slide { flex-basis: 78%; }
}

/* ─── Latest jobs - tiles ──────────────────────────────────────────────────── */
.jt-latest__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.jt-latest__title { font-size: 18px; font-weight: 600; color: var(--jt-w-accent); }
.jt-latest__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.jt-tile {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--jt-w-border); border-radius: 10px; text-decoration: none;
  background: var(--jt-color-surface, #fff); transition: border-color 150ms ease, box-shadow 150ms ease;
}
.jt-tile:hover { border-color: var(--jt-color-accent-soft, #2DD3BE); box-shadow: 0 6px 16px rgba(29,31,123,0.08); }
.jt-tile__badge {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  background: #F0F0FE; color: #4B4DC8; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.jt-tile__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.jt-tile__title { font-size: 13px; font-weight: 600; color: var(--jt-w-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-tile__meta { font-size: 11px; color: var(--jt-w-muted); }
.jt-tile__arrow { color: var(--jt-color-accent-soft, #2DD3BE); font-size: 15px; font-weight: 700; }
@media (max-width: 560px) { .jt-latest__grid { grid-template-columns: 1fr; } }

/* ─── Search bars (3 styles) ───────────────────────────────────────────────── */
.jt-search__row { display: flex; gap: 10px; }
.jt-search__input {
  flex: 1; min-width: 0; padding: 12px 18px; font-size: 13px; font-family: inherit;
  color: var(--jt-color-text, #1D1F7B); border: 1px solid var(--jt-w-border);
  border-radius: var(--jt-btn-radius, 999px); outline: none; background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.jt-search__input:focus { border-color: var(--jt-color-accent-soft, #2DD3BE); box-shadow: 0 0 0 3px rgba(45,211,190,0.25); }
.jt-search__btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: none; background: var(--jt-btn-bg, var(--jt-color-accent-soft, #2DD3BE));
  color: var(--jt-btn-ink, var(--jt-color-accent, #1D1F7B));
  font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  padding: var(--jt-btn-pad, 12px 28px); border-radius: var(--jt-btn-radius, 999px);
  transition: opacity 150ms ease;
}
.jt-search__btn:hover { opacity: 0.88; }
.jt-search__btn:focus-visible { outline: 2px solid var(--jt-w-blue); outline-offset: 2px; }

/* Style 2 - combined pill bar */
.jt-search--style-2 .jt-search__row {
  border: 1px solid var(--jt-w-border); border-radius: var(--jt-btn-radius, 999px);
  overflow: hidden; gap: 0; box-shadow: 0 4px 16px rgba(29,31,123,0.06); background: #fff;
}
.jt-search--style-2 .jt-search__input { border: none; border-radius: 0; box-shadow: none; }
.jt-search--style-2 .jt-search__input:not(:first-child) { border-left: 1px solid var(--jt-w-border); }
.jt-search--style-2 .jt-search__input:focus { box-shadow: none; }
.jt-search--style-2 .jt-search__btn { border-radius: 0; }

/* Style 3 - compact dark hero */
.jt-search--style-3 {
  background: linear-gradient(135deg, var(--jt-color-accent, #1D1F7B), #6466F1);
  border-radius: 14px; padding: 24px;
}
.jt-search--style-3 .jt-search__heading { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.jt-search--style-3 .jt-search__row { gap: 8px; }
.jt-search--style-3 .jt-search__input { border: none; border-radius: 8px; background: rgba(255,255,255,0.95); }
.jt-search--style-3 .jt-search__input--location { flex: 0 0 130px; }
.jt-search--style-3 .jt-search__btn { border-radius: 8px; padding: 0 16px; }
.jt-search--style-3 .jt-search__btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 640px) {
  .jt-search__row { flex-direction: column; }
  .jt-search--style-2 .jt-search__row { flex-direction: column; }
  .jt-search--style-2 .jt-search__input:not(:first-child) { border-left: none; border-top: 1px solid var(--jt-w-border); }
  .jt-search--style-3 .jt-search__input--location { flex: 1; }
}

/* ─── Job board design presets ─────────────────────────────────────────────── */
/* Design 2/3: prefer a horizontal filter bar over the sidebar where the theme
   allows it; the shared filter markup already reflows responsively. */
.jt-board--design-2 .jt-card { border-color: var(--jt-color-border, #E3E4F2); }

/* Design 4 - featured hero + side list (templates/job-layouts/featured.php) */
.jt-featured { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.jt-featured__hero {
  background: linear-gradient(135deg, var(--jt-color-accent, #1D1F7B), #6466F1);
  border-radius: 14px; padding: 26px; color: #fff;
  display: flex; flex-direction: column; gap: 10px;
}
.jt-featured__flag {
  align-self: flex-start; background: rgba(255,255,255,0.16);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; padding: 4px 12px; border-radius: 999px;
}
.jt-featured__title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.25; }
.jt-featured__title a { color: #fff; text-decoration: none; }
.jt-featured__title a:hover { text-decoration: underline; }
.jt-featured__cat,
.jt-featured__meta { font-size: 12px; opacity: 0.85; }
.jt-featured__blurb { font-size: 12.5px; line-height: 1.6; opacity: 0.92; margin: 0; flex: 1; }
.jt-featured__hero .jt-apply-btn {
  align-self: flex-start;
  background: var(--jt-color-accent-soft, #2DD3BE) !important;
  color: var(--jt-color-accent, #1D1F7B) !important;
  padding: 11px 26px !important;
}
.jt-featured__side { display: flex; flex-direction: column; gap: 10px; }
.jt-featured__row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--jt-color-border, #E3E4F2); border-radius: 10px;
  text-decoration: none; background: var(--jt-color-surface, #fff); transition: border-color .15s;
}
.jt-featured__row:hover { border-color: var(--jt-color-accent-soft, #2DD3BE); }
.jt-featured__row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jt-featured__row-title { font-size: 12.5px; font-weight: 600; color: var(--jt-color-accent, #1D1F7B); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-featured__row-meta { font-size: 11px; color: var(--jt-color-muted, #7A7CB0); }
.jt-featured__row-arrow { color: var(--jt-color-accent-soft, #2DD3BE); font-size: 16px; font-weight: 700; }
@media (max-width: 720px) { .jt-featured { grid-template-columns: 1fr; } }

/* ─── Meet the Team v2 ─────────────────────────────────────────────────────── */
.jt-team-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.jt-team-tab {
  border: 1px solid var(--jt-w-border); background: #fff; color: var(--jt-w-ink);
  font-family: inherit; font-size: 12px; font-weight: 600; padding: 8px 20px;
  border-radius: var(--jt-btn-radius, 999px); cursor: pointer; text-decoration: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.jt-team-tab:hover { border-color: var(--jt-color-accent-soft, #2DD3BE); }
.jt-team-tab.is-active { border-color: transparent; background: var(--jt-color-accent-soft, #2DD3BE); color: var(--jt-w-accent); font-weight: 700; }

.jt-team-member[hidden] { display: none !important; }

/* Photo avatar (shared): photo fills, else initials circle */
.jt-team-avatar {
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; overflow: hidden; background: #E3E4F8; color: var(--jt-w-accent);
  font-weight: 600; flex-shrink: 0;
}
.jt-team-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Style: cards */
.jt-team--cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.jt-team-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 24px; border: 1px solid var(--jt-w-border); border-radius: 14px; background: #fff;
  transition: box-shadow 150ms ease;
}
.jt-team-card:hover { box-shadow: 0 10px 24px rgba(29,31,123,0.10); }
.jt-team-card .jt-team-avatar { width: 96px; height: 96px; font-size: 26px; }
.jt-team-card__name { font-size: 14.5px; font-weight: 600; color: var(--jt-w-accent); margin-top: 4px; }
.jt-team-card__role { font-size: 12px; font-weight: 600; color: #6466F1; }
.jt-team-card__dept { font-size: 11px; color: var(--jt-w-muted); }
.jt-team-card__bio  { font-size: 12px; line-height: 1.55; color: var(--jt-w-ink); }
.jt-team-card__links { display: flex; gap: 10px; margin-top: 4px; }
.jt-team-card__links a { color: var(--jt-w-muted); }
.jt-team-card__links a:hover { color: var(--jt-w-accent); }

/* Style: avatars (hover reveals name + title) */
.jt-team--avatars { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.jt-team-avatar-wrap { position: relative; width: 84px; height: 84px; }
.jt-team-avatar-wrap .jt-team-avatar { width: 84px; height: 84px; font-size: 22px; }
.jt-team-avatar-overlay {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(29,31,123,0.92); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-align: center; padding: 6px; opacity: 0;
  transition: opacity 180ms cubic-bezier(0.22,0.8,0.35,1);
}
.jt-team-avatar-wrap:hover .jt-team-avatar-overlay,
.jt-team-avatar-wrap:focus-within .jt-team-avatar-overlay { opacity: 1; }
.jt-team-avatar-overlay__name { font-size: 9.5px; font-weight: 700; line-height: 1.25; }
.jt-team-avatar-overlay__role { font-size: 8px; opacity: 0.85; line-height: 1.3; }

/* Style: dense photo grid */
.jt-team--grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jt-team-gtile {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: #E3E4F8; color: var(--jt-w-accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.jt-team-gtile img { width: 100%; height: 100%; object-fit: cover; }
.jt-team-gtile__ini { font-size: 24px; font-weight: 600; }
.jt-team-gtile__first { font-size: 10px; font-weight: 600; opacity: 0.75; }

/* Style: carousel (reuses .jt-carousel) */
.jt-team--carousel .jt-carousel__slide > .jt-team-cslide { width: 100%; }
.jt-team-cslide {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 18px; border: 1px solid var(--jt-w-border); border-radius: 12px; background: #fff;
}
.jt-team-cslide .jt-team-avatar { width: 68px; height: 68px; font-size: 19px; }
.jt-team-cslide__name { font-size: 12.5px; font-weight: 600; color: var(--jt-w-accent); }
.jt-team-cslide__role { font-size: 10.5px; font-weight: 600; color: #6466F1; }

@media (max-width: 900px) { .jt-team--cards { grid-template-columns: repeat(2, 1fr); } .jt-team--grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .jt-team--cards { grid-template-columns: 1fr; } .jt-team--grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Candidate registration templates (spec 1i) ───────────────────────────── */
.jt-register { font-family: var(--jt-font, 'Montserrat', system-ui, sans-serif); }
.jt-register * { box-sizing: border-box; }
.jt-reg-cta { cursor: pointer; }

.jt-register--card {
  max-width: 420px; margin: 0 auto; text-align: center;
  border: 1px solid var(--jt-color-border, #E3E4F2); border-radius: 16px;
  background: var(--jt-color-surface, #fff); padding: 32px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.jt-register-card__icon {
  width: 48px; height: 48px; border-radius: 999px; background: #D7F6F0; color: #0E7B6C;
  display: flex; align-items: center; justify-content: center;
}
.jt-register-card__title { font-size: 18px; font-weight: 600; color: var(--jt-color-accent, #1D1F7B); }
.jt-register-card__intro { font-size: 12.5px; line-height: 1.6; color: var(--jt-color-muted, #4A4C8A); margin: 0; }
.jt-register__fine { font-size: 10.5px; color: #7A7CB0; margin: 0; }

.jt-register--split {
  display: grid; grid-template-columns: 1fr 1.3fr; overflow: hidden;
  border: 1px solid var(--jt-color-border, #E3E4F2); border-radius: 16px; background: #fff;
}
.jt-register-split__aside {
  background: linear-gradient(135deg, var(--jt-color-accent, #1D1F7B), #6466F1);
  color: #fff; padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.jt-register-split__title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.jt-register-split__intro { font-size: 12.5px; line-height: 1.65; opacity: 0.92; margin: 0; }
.jt-register-split__benefits { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jt-register-split__benefits li { font-size: 11.5px; display: flex; align-items: center; gap: 8px; }
.jt-register-split__benefits li::before { content: '\2713'; color: #2DD3BE; font-weight: 700; }
.jt-register-split__main { padding: 28px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.jt-register__lead { font-size: 16px; font-weight: 600; color: var(--jt-color-accent, #1D1F7B); margin: 0; }
.jt-register__sub { font-size: 12.5px; line-height: 1.6; color: var(--jt-color-muted, #4A4C8A); margin: 0; }
@media (max-width: 560px) { .jt-register--split { grid-template-columns: 1fr; } }
