/* NoRepTV Tip (SPEC 52): the Tip button, its dialog, the list on the channel page (?tip=1, without JavaScript), the Tips
   section of NoRep Studio > Customize and the Overview's Tips card. Loaded only where one of them is on the page. */

/* The button sits with its neighbours (.btn in the watch page's control row, the channel header, the live page) */
.tip-btn .icon { flex: none; }

/* The dialog and the in-page list ------------------------------------------------------------------------------ */

.tip-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
}
.tip-body { gap: 16px; }
.tip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tip-head .dialog-title { padding-top: 6px; }
.tip-close { flex: none; margin: -4px -6px 0 0; }

.tip-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tip-row {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text);
}
a.tip-row { transition: border-color 0.15s, background-color 0.15s; }
a.tip-row:hover { border-color: var(--text-3); background: var(--hover); }
.tip-row-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.tip-app { font-size: 15px; font-weight: 700; }
.tip-handle { font-size: 14.5px; color: var(--text); overflow-wrap: anywhere; }
.tip-zelle-line { margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.tip-row-icon { flex: none; display: grid; color: var(--text-2); }
.tip-copy { flex: none; height: 36px; padding: 0 14px; background: var(--bg); border-color: var(--line); }
.tip-copy:hover { background: var(--hover); }
.tip-foot { font-size: 13px; line-height: 1.45; color: var(--text-2); }

/* Phones: Zelle's Copy goes under its details, so the address keeps the row's width */
@media (max-width: 400px) {
  .tip-row { padding: 10px 12px; }
  .tip-row-zelle { flex-wrap: wrap; }
  .tip-row-zelle .tip-row-text { flex-basis: 100%; }
  .tip-row-zelle .tip-copy { margin-left: auto; }
}

/* The channel page's list (?tip=1#tip). The link lands it below the sticky header (two rows, about 107px, at 720px and
   below), as legal.css does for its anchors */
.tip-page {
  display: grid; gap: 14px; max-width: 520px; margin: -8px 0 26px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  scroll-margin-top: 84px;
}
@media (max-width: 720px) { .tip-page { scroll-margin-top: 124px; } }
.tip-page-title { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.tip-page .tip-row { background: var(--surface-2); }

/* NoRep Studio > Customize: the Tips section ---------------------------------------------------------------- */

.tip-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.tip-fields .field { min-width: 0; }
.tip-fields input { width: 100%; }
.tip-fields input[aria-invalid="true"] { border-color: var(--danger-text); }
.tip-field-note { margin-top: 4px; }
.tip-field-error { margin-top: 4px; }
.tip-off-note {
  padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 14px;
}
@media (max-width: 640px) {
  .tip-fields { grid-template-columns: minmax(0, 1fr); }
}

/* NoRep Studio > Overview: the Tips card ------------------------------------------------------------------- */

.tip-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.tip-stat {
  display: grid; gap: 2px; min-width: 112px; flex: 1 1 112px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.tip-stat dt { font-size: 13px; color: var(--text-2); }
.tip-stat dd { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tip-card-note { margin-top: 12px; }
