/*
 * Form controls for /account/delete{,-pt,-es}. Loaded after legal.css and built
 * entirely on its tokens (--primary, --border, --muted, --radius-md, --text) —
 * no new palette, no new type scale. legal.css has never needed an input or a
 * button because every other legal page is prose; this file adds only those.
 *
 * Sized for a phone first: this page is reached by someone who has already
 * uninstalled the app, overwhelmingly from the handset it was on. Controls are
 * full-width with a >=48px tap target, and inputs are 17px because anything
 * under 16px makes iOS Safari zoom on focus and throws the layout sideways.
 */

.ql-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.ql-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.ql-input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 17px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d8e2f2;
  border-radius: var(--radius-md);
  outline: none;
}

.ql-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 139, 246, 0.22);
}

/* The 6-digit code: spaced out so a mistyped digit is visible at a glance. */
.ql-input-code {
  letter-spacing: 0.4em;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.ql-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.ql-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.ql-btn-primary:hover:not(:disabled) {
  background: #3d78e0;
}

/* Deliberately not the brand blue: the irreversible action must not look like
   the same button as "send me a code". */
.ql-btn-danger {
  color: #fff;
  background: #c0392b;
}

.ql-btn-danger:hover:not(:disabled) {
  background: #a93226;
}

.ql-btn-quiet {
  color: var(--muted);
  background: transparent;
  border-color: var(--border);
  font-weight: 600;
}

.ql-hint {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.ql-sent,
.ql-verified {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.ql-warning {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid #c0392b;
  border-radius: 14px;
  background: #fdf3f2;
  color: #7d2a20;
  font-size: 16px;
  line-height: 1.6;
}

.ql-status {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.6;
}

.ql-status-error {
  color: #a93226;
}

.ql-status-info {
  color: var(--muted);
}

.ql-done-title {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.ql-done p,
.ql-unavailable p {
  margin: 0 0 12px;
  line-height: 1.7;
}

.ql-unavailable .ql-btn {
  margin-top: 4px;
}

@media (min-width: 640px) {
  .ql-btn,
  .ql-input {
    width: auto;
    align-self: flex-start;
    min-width: 280px;
  }
}

/*
 * legal.css collapses .legal-table to blocks under 760px and hides the <thead>,
 * which is fine for the two-column tables it was written for but loses the
 * meaning of a three-column retention table on the exact device most people read
 * this page on. Each cell carries its own header there instead, from data-label.
 */
.ql-retention tbody tr {
  border-top: 1px solid var(--border);
}

.ql-retention td:first-child {
  font-weight: 700;
}

@media (max-width: 760px) {
  .ql-retention td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #463f53;
  }

  .ql-retention td:first-child::before {
    content: none;
  }

  .ql-retention td:first-child {
    padding-top: 16px;
  }
}
