/* Help tickets on the website (go-live item 26): the help form (/help/ and under
   Contact Us), a ticket's page (/support/t/<key>/) and "Your tickets". Loaded only
   on those pages; uses the site's tokens from site.css. Owner's rules: every
   field and button one height and font, nothing touching, one centre line,
   nothing bold but headings, Inter as the fallback. */

.tk-wrap { max-width: 860px; margin: 8px auto 64px; }
.tk-head h1 { max-width: none; margin-bottom: 8px; }
.tk-lead { font-size: 15.5px; color: var(--body); margin: 0 0 20px; line-height: 1.55; max-width: 62ch; }
.tk-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 24px; }
.tk-card h2 { margin: 0 0 6px; font-size: 20px; }
.tk-card > p { margin: 0; color: var(--body); }

/* ------------------------------------------------------------------ the form */
.tk-form { display: grid; gap: 16px; font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif; }
.tk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tk-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.tk-field { display: grid; gap: 7px; align-content: start; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.tk-opt { font-weight: 400; color: var(--muted); }
.tk-form input[type="text"], .tk-form input[type="email"], .tk-form input[type="tel"], .tk-form select, .tk-form textarea {
  width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--border-4); border-radius: 12px; background: var(--white); color: var(--ink);
  font: 400 15px/1.4 Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tk-form textarea { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.tk-form select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23565961' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.tk-form input:focus, .tk-form select:focus, .tk-form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
.tk-form ::placeholder { color: var(--muted); }

.tk-who { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tint); color: var(--body); font-size: 14.5px; }
.tk-who span { color: var(--ink); font-weight: 600; }
.tk-alert { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--red-tint); border: 1px solid var(--red-border); color: var(--red-deep); font-size: 14.5px; }

/* The screenshot picker: a button and the chosen name, never the browser's "Choose file". */
.tk-file { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tk-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.tk-file-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; box-sizing: border-box;
  border: 1.5px dashed var(--border-4); border-radius: 12px; background: var(--tint); color: var(--ink);
  font-size: 14.5px; font-weight: 500; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.tk-file-btn:hover { border-color: var(--red); background: var(--red-tint-2); }
.tk-file-input:focus-visible + .tk-file-btn { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
.tk-file.has-file .tk-file-btn { border-style: solid; border-color: var(--red-border-2); background: var(--red-tint-2); }
.tk-file-name { font-size: 13.5px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.tk-file.has-file .tk-file-name { color: var(--ink); }
.tk-file.is-bad .tk-file-name { color: var(--red); }
.tk-file-clear { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--fill); color: var(--body); font-size: 20px; line-height: 1; cursor: pointer; }
.tk-file-clear:hover { background: var(--stripe); color: var(--ink); }

.tk-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.tk-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tk-send { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 26px; box-sizing: border-box; font-size: 15px; }
.tk-fine { font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------- a ticket */
.tk-crumb { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.tk-crumb a { color: var(--body); }
.tk-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tk-title-row h1 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); }
.tk-meta { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.tk-num { font-variant-numeric: tabular-nums; color: var(--body); font-weight: 500; }

.tk-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tk-pill.tk-open { background: #e8efff; color: #2f54b8; }
.tk-pill.tk-waiting { background: var(--success-bg); color: var(--success); }
.tk-pill.tk-closed { background: var(--fill); color: var(--body); }

.tk-note { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--white); color: var(--body); font-size: 14.5px; line-height: 1.55; }
.tk-note strong { color: var(--ink); }
.tk-good { background: var(--success-bg); border-color: #cfe8d9; }

.tk-thread { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 14px; }
.tk-msg { max-width: 88%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--white); }
.tk-msg.is-me { justify-self: end; background: var(--red-tint-2); border-color: var(--red-border); border-bottom-right-radius: 6px; }
.tk-msg.is-team { justify-self: start; border-left: 3px solid var(--red); border-bottom-left-radius: 6px; }
.tk-msg-who { margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tk-msg-body { font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.tk-shot { display: inline-block; margin-top: 10px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.tk-shot img { display: block; max-width: 260px; max-height: 200px; object-fit: cover; }
.tk-answer .tk-form textarea { min-height: 110px; }
.tk-close { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--stripe); }
.tk-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tk-link:hover { color: var(--ink); }

/* ---------------------------------------------------------- your tickets */
.tk-mine { margin: 36px 0 8px; }
.tk-mine-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.tk-mine-head h2 { margin: 0; }
.tk-new { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; box-sizing: border-box; }
.tk-empty { margin: 10px 0 0; color: var(--body); font-size: 14.5px; }
.tk-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--white); color: inherit; text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tk-item:hover { border-color: var(--border-4); box-shadow: 0 6px 18px rgba(22, 24, 29, .06); text-decoration: none; }
.tk-item.is-unread { border-color: var(--red-border-2); }
.tk-item-main { display: grid; gap: 5px; min-width: 0; }
.tk-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-dot { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 600; }
.tk-item-subject { font-size: 15px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-when { flex: none; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------- under Contact Us */
.tk-contact { margin-top: 40px; padding-top: 8px; }
.tk-contact h2 { margin: 0 0 8px; }

@media (max-width: 720px) {
  .tk-row, .tk-row-3 { grid-template-columns: 1fr; }
  .tk-card { padding: 18px; border-radius: 16px; }
  .tk-msg { max-width: 100%; }
}
@media (max-width: 560px) {
  .tk-actions .tk-send { width: 100%; }
  .tk-item { align-items: flex-start; }
}
.tk-label { display: block; }
