/* ==========================================================================
   Japan Jobs — dispatch-ticket design system
   Namespace: .jj-*  (kept isolated from Flatsome's own classes)
   ========================================================================== */

:root {
  --jj-paper: #FFFFFF;
  --jj-sand: #F5F3EF;
  --jj-line: #E4E1DA;
  --jj-perf: #D8D4CB;
  --jj-ink: #211F1E;
  --jj-seal: #A61220;
  --jj-seal-dark: #7D0E18;
  --jj-seal-tint: #FBEAEC;
  --jj-steel: #55606B;
  --jj-steel-tint: #EEF0F2;
  --jj-bamboo: #29572E;
  --jj-bamboo-tint: #EAF3EB;
  --jj-font-body: 'Lato', -apple-system, sans-serif;
  --jj-font-display: 'Barlow Semi Condensed', 'Lato', -apple-system, sans-serif;
}

.jj-ticket-list,
.jj-detail,
.jj-sheet,
.jj-timeline {
  font-family: var(--jj-font-body);
  color: var(--jj-ink);
}

/* Neutralize Flatsome's inherited uppercase transform inside our components —
   it makes long Vietnamese sentences with diacritics harder to read. */
.jj-ticket-list,
.jj-ticket-list *,
.jj-detail,
.jj-detail dt,
.jj-detail dd,
.jj-detail p {
  text-transform: none;
}

/* ---------- Archive: ticket list ---------- */

.jj-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 24px;
  list-style: none;
  padding: 0;
}

.jj-ticket {
  display: flex;
  align-items: stretch;
  background: var(--jj-paper);
  border: 1px solid var(--jj-line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(33, 31, 30, .05);
  position: relative;
  overflow: hidden;
}

.jj-ticket--expired {
  opacity: .55;
}

.jj-ticket__main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 20px 24px;
}

.jj-ticket__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.jj-tag {
  font-family: var(--jj-font-display);
  font-weight: 600;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--jj-sand);
  color: var(--jj-steel);
  white-space: nowrap;
}

.jj-tag--region {
  background: var(--jj-seal);
  color: #fff;
}

.jj-ticket__title {
  font-family: var(--jj-font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 10px;
}

.jj-ticket__title a {
  color: inherit;
  text-decoration: none;
}

.jj-ticket__title a:hover,
.jj-ticket__title a:focus-visible {
  color: var(--jj-seal);
}

.jj-ticket__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--jj-steel);
}

.jj-fact i {
  color: var(--jj-seal);
  margin-right: 6px;
  width: 14px;
  text-align: center;
}

.jj-ticket__perf {
  flex: 0 0 24px;
  position: relative;
  background-image: repeating-linear-gradient(to bottom, var(--jj-perf) 0 6px, transparent 6px 13px);
  background-size: 2px 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.jj-ticket__perf::before,
.jj-ticket__perf::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  background: var(--jj-paper);
  border: 1px solid var(--jj-line);
  border-radius: 50%;
}

.jj-ticket__perf::before { top: -7px; }
.jj-ticket__perf::after { bottom: -7px; }

.jj-ticket__stub {
  flex: 0 0 190px;
  background: var(--jj-sand);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.jj-ticket__salary {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--jj-font-display);
}

.jj-ticket__salary-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--jj-seal);
}

.jj-ticket__salary-unit {
  font-size: 12px;
  color: var(--jj-steel);
}

.jj-ticket__deadline {
  font-size: 13px;
  color: var(--jj-steel);
  border-top: 1px dashed var(--jj-perf);
  padding-top: 8px;
}

.jj-ticket__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.jj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--jj-font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.jj-btn--primary {
  background: var(--jj-seal);
  color: #fff;
}

.jj-btn--primary:hover { background: var(--jj-seal-dark); color: #fff; }

.jj-btn--ghost {
  background: transparent;
  border-color: var(--jj-steel);
  color: var(--jj-steel);
}

.jj-btn--ghost:hover { background: var(--jj-steel-tint); }

.jj-btn--disabled {
  background: var(--jj-line);
  color: #8B8578;
  cursor: default;
}

.jj-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--jj-steel);
  font-size: 16px;
  flex: 0 0 auto;
}

.jj-heart:hover { background: var(--jj-steel-tint); }
.jj-heart--active { color: var(--jj-seal); }

.jj-empty {
  padding: 32px 24px;
  background: var(--jj-sand);
  border-radius: 10px;
  font-family: var(--jj-font-body);
  color: var(--jj-ink);
}

@media (max-width: 700px) {
  .jj-ticket { flex-direction: column; }

  .jj-ticket__perf {
    flex: 0 0 24px;
    width: 100%;
    background-image: repeating-linear-gradient(to right, var(--jj-perf) 0 6px, transparent 6px 13px);
    background-size: 100% 2px;
    background-position: center;
    background-repeat: no-repeat;
  }

  .jj-ticket__perf::before,
  .jj-ticket__perf::after {
    top: 50%;
    left: -7px;
    transform: translateY(-50%);
  }

  .jj-ticket__perf::after { left: auto; right: -7px; }

  .jj-ticket__stub { flex: 0 0 auto; }
}

/* ---------- Single: order sheet ---------- */

.jj-detail__topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--jj-line);
  padding: 14px 0;
  margin: 0 0 20px;
}

.jj-detail__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--jj-font-display);
}

.jj-detail__price-amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--jj-seal);
}

.jj-detail__price-unit {
  font-size: 13px;
  color: var(--jj-steel);
}

.jj-detail__deadline {
  font-size: 13px;
  color: var(--jj-steel);
  margin-left: 14px;
}

.jj-detail__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.jj-chip {
  font-size: 13px;
  color: var(--jj-ink);
  background: var(--jj-sand);
  border: 1px solid var(--jj-line);
  border-radius: 999px;
  padding: 6px 14px;
}

.jj-chip i { color: var(--jj-seal); margin-right: 6px; }

.jj-sheet {
  border-left: 3px solid var(--jj-seal);
  padding: 4px 0 4px 20px;
  margin: 0 0 28px;
}

.jj-sheet__title {
  font-family: var(--jj-font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .01em;
  margin: 0 0 14px;
  color: var(--jj-ink);
}

.jj-sheet__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  margin: 0;
}

.jj-sheet__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--jj-line);
  padding-bottom: 10px;
}

.jj-sheet__row--wide { grid-column: 1 / -1; }

.jj-sheet__row dt {
  font-size: 12px;
  color: var(--jj-steel);
}

.jj-sheet__row dd {
  margin: 0;
  font-size: 15px;
  color: var(--jj-ink);
}

@media (max-width: 640px) {
  .jj-sheet__grid { grid-template-columns: 1fr; }
}

.jj-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 8px 4px 4px;
}

.jj-timeline__point {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.jj-timeline__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--jj-steel);
  background: var(--jj-paper);
  margin-bottom: 8px;
}

.jj-timeline__point.is-done .jj-timeline__dot {
  border-color: var(--jj-seal);
  background: var(--jj-seal);
}

.jj-timeline__label {
  font-family: var(--jj-font-display);
  font-weight: 600;
  font-size: 14px;
}

.jj-timeline__date {
  font-size: 13px;
  color: var(--jj-steel);
}

.jj-timeline__track {
  flex: 1 1 0;
  height: 2px;
  background: var(--jj-line);
  margin-top: 6px;
  align-self: flex-start;
}

.jj-timeline__track.is-done { background: var(--jj-seal); }

.jj-contact {
  font-size: 14px;
  color: var(--jj-steel);
  line-height: 1.7;
}

.jj-related-title {
  font-family: var(--jj-font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 8px 0 16px;
}
.jj-nodata { color: var(--jj-steel, #5e6673); font-style: italic; }
