/* The team's join and sign-in pages (templates/team/public_base.html), and the printable
   signed agreement. Connecteam's shape -- one phone-sized card on a grey page, one short
   form, one full-width pill button -- in HPN's tokens (tokens.css), light and dark. */

.tp {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-muted);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 2rem;
  box-sizing: border-box;
}
.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
.tp-card {
  width: 100%;
  max-width: 26rem;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .18), 0 0 0 1px var(--border);
  padding: 2rem 1.5rem 1.75rem;
}
.tp-logo { display: block; width: max-content; margin: 0 auto 1.25rem; color: var(--text); }
.tp-logo .logo { height: 56px; width: auto; color: var(--text); }
.tp-title { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 .35rem; text-align: center; }
.tp-lead { margin: 0 0 1.25rem; text-align: center; color: var(--text-muted); }
.tp-form { display: flex; flex-direction: column; gap: 1rem; }
.tp-field { display: flex; flex-direction: column; gap: .35rem; }
.tp-field label { font-weight: 600; font-size: .95rem; }
.tp-req { color: var(--danger); }
.tp-field input {
  font: inherit;
  height: 3rem;
  padding: 0 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-control);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.tp-field input:focus-visible { outline: var(--focus-ring-width, 3px) solid var(--focus-ring); outline-offset: 1px; }
.tp-field input[readonly] { background: var(--surface-muted); }
.tp-field.is-invalid input { border-color: var(--danger); }
.tp-field__error { margin: 0; color: var(--danger); font-size: .9rem; }
.tp-help { margin: 0; font-size: .85rem; color: var(--text-muted); }
.tp-phone { display: flex; align-items: stretch; }
.tp-phone__cc {
  display: flex; align-items: center; padding: 0 .75rem; border: 1px solid var(--border-control);
  border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-muted);
  font-size: .95rem; white-space: nowrap;
}
.tp-phone input { border-radius: 0 10px 10px 0; }
/* The country picker (static/js/team-phone.js): "TH v +66" before the number, and the list. */
.tp-phone--picker { position: relative; }
.tp-cc {
  gap: .35rem; font: inherit; color: var(--text); background: var(--surface); cursor: pointer;
}
.tp-cc:hover { background: var(--surface-muted); }
.tp-cc:focus-visible { outline: var(--focus-ring-width, 3px) solid var(--focus-ring); outline-offset: 1px; position: relative; z-index: 1; }
.tp-cc__iso { font-weight: 700; }
.tp-cc__chev { width: .45rem; height: .45rem; margin: 0 .15rem -.05rem .05rem; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: translateY(-.15rem) rotate(45deg); }
.tp-cc[aria-expanded="true"] .tp-cc__chev { transform: translateY(.1rem) rotate(-135deg); }
.tp-cc__dial { margin-left: .25rem; }
.tp-cc[hidden], .tp-cc-pop[hidden] { display: none; }
.tp-phone.is-email input { border-radius: 10px; }
.tp-cc-pop {
  position: absolute; z-index: 20; top: calc(100% + .4rem); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); padding: .5rem;
}
.tp-field .tp-cc-pop__search { height: 2.6rem; border-radius: 10px; padding: 0 .85rem; }
.tp-cc-pop__list { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 16.5rem; overflow-y: auto; overscroll-behavior: contain; }
.tp-cc-pop__item { display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem; border-radius: 8px; cursor: pointer; }
.tp-cc-pop__item:hover, .tp-cc-pop__item.is-active { background: var(--surface-muted); }
.tp-cc-pop__item.is-picked { background: var(--brand-wash); }
.tp-cc-pop__iso { width: 2rem; flex: none; font-size: .9rem; }
.tp-cc-pop__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-cc-pop__dial { color: var(--text-muted); font-size: .9rem; }
.tp-cc-pop__none { padding: .75rem; color: var(--text-muted); text-align: center; }
.tp-code { letter-spacing: .5em; text-align: center; font-size: 1.4rem !important; font-variant-numeric: tabular-nums; }
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  min-height: 3rem; padding: .75rem 1.25rem; border-radius: 999px; border: 0;
  background: var(--brand-500); color: var(--text-on-brand); font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; margin-top: .25rem;
}
.tp-btn:hover { background: var(--brand-600); }
.tp-btn:focus-visible { outline: var(--focus-ring-width, 3px) solid var(--focus-ring); outline-offset: 2px; }
.tp-btn--ghost { background: transparent; color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--border-control); }
.tp-btn--ghost:hover { background: var(--brand-wash); }
.tp-check { display: flex; gap: .6rem; align-items: center; font-size: .95rem; }
.tp-check input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand-500); }
.tp-error, .tp-note {
  margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 10px; font-size: .95rem;
}
.tp-error { background: var(--danger-wash); color: var(--danger); }
.tp-note { background: var(--brand-wash); color: var(--brand-ink-strong); }
.tp-small { margin: .75rem 0 0; text-align: center; font-size: .9rem; color: var(--text-muted); }
.tp-small a, .tp-link { color: var(--brand-ink); font-weight: 600; }
.tp-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.tp-inline { margin-top: 1rem; text-align: center; font-size: .9rem; color: var(--text-muted); }
.tp-rule { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0 .25rem; }
.tp-foot { margin-top: 1.25rem; font-size: .85rem; color: var(--text-muted); }
.tp-foot a { color: inherit; }
.tp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tp-done {
  width: 4.5rem; height: 4.5rem; border-radius: 50%; margin: 0 auto 1rem; display: grid;
  place-items: center; background: var(--brand-wash); color: var(--brand-500);
}

/* The signed agreement, for screen and paper. */
.tp--print { display: block; background: var(--surface); }
.tp-doc { max-width: 46rem; margin: 0 auto; padding: 1rem 0 3rem; }
.tp-doc h1 { font-family: var(--font-display); font-size: 1.8rem; margin: 0; }
.tp-doc__meta { color: var(--text-muted); margin: .25rem 0 1.5rem; }
.tp-doc__body p { margin: 0 0 .8rem; }
.tp-doc__sign { margin-top: 2rem; padding-top: 1rem; border-top: 2px solid var(--text); }
.tp-doc__signature { max-width: 320px; height: auto; display: block; margin: .5rem 0; background: #fff; }
.tp-doc__fp { font-size: .75rem; color: var(--text-muted); word-break: break-all; }
@media print { .tp--print { padding: 0; } .tp-foot { display: none; } }
