/* salaiptv.com/add: one narrow column, phone first, on the front page's
   tokens (styles.css). The code is the big thing; the form under it. */

[hidden] { display: none !important; }

.add {
  max-width: 32rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter) clamp(3rem, 8vw, 5rem);
}
.add-head h1 {
  font-size: clamp(2.25rem, 9vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.add-lead { margin-top: 0.75rem; color: var(--paper-2); font-size: 1.125rem; }

.add-form { margin-top: 2rem; }
.field { display: block; }
.field + .field, .kind-fields > .field + .field { margin-top: 1rem; }
.kind-fields, .add-form > .field:not(.field-code) { margin-top: 1rem; }
.label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.95rem; }
.optional { margin-left: 0.35rem; color: var(--paper-3); font-weight: 400; }

.field input {
  display: block;
  width: 100%;
  height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--raised);
  color: var(--paper);
  font: inherit;
  font-size: 1.0625rem;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: var(--paper-3); opacity: 1; }
.field input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgb(183 122 255 / 0.25); }

/* The code: read off a TV and typed with a thumb, so big and spaced. */
.field-code input {
  height: 4.5rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}
.field-code input::placeholder { font-weight: 400; letter-spacing: 0.18em; }
.field-code input.is-ok { border-color: #5fd39a; }
.field-code input.is-bad { border-color: #ff7a8a; }
.field-note { display: block; min-height: 1.5em; margin-top: 0.4rem; color: var(--paper-2); font-size: 0.95rem; }

/* Xtream login or playlist link: a two-way switch. */
.kind {
  display: flex;
  margin: 1.25rem 0 0;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  min-width: 0;
}
.kind-option { flex: 1; position: relative; }
.kind-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kind-option span {
  display: block;
  padding: 0.6rem 0.5rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 500;
  color: var(--paper-2);
  transition: background-color 0.15s, color 0.15s;
}
.kind-option input:checked + span { background: var(--paper); color: var(--black); }
.kind-option input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }

.add-error {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgb(255 122 138 / 0.45);
  border-radius: 12px;
  background: rgb(255 122 138 / 0.08);
  color: #ffb3bd;
}
.add-send {
  justify-content: center;
  width: 100%;
  height: 3.5rem;
  margin-top: 1.5rem;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
}
.add-send:disabled { opacity: 0.6; cursor: default; }
.add-note { margin-top: 0.85rem; color: var(--paper-3); font-size: 0.9rem; text-align: center; }

.add-done {
  margin-top: 2rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--raised);
  text-align: center;
}
.add-done:focus { outline: none; }
.add-done-mark { display: block; margin: 0 auto 1rem; color: #5fd39a; }
.add-done-text { font-size: 1.25rem; font-weight: 500; text-wrap: balance; }

.add-help { margin-top: 2.5rem; color: var(--paper-3); font-size: 0.9rem; }
