/* Notificações › Push rápido: composer em passos + prévia do iPhone.
   Também: dica flutuante da barra lateral (.nav-hint). Só tokens do style.css,
   exceto o mockup do iOS, que imita os materiais claro/escuro do sistema. */

/* ── Sidebar hint: beside the rail, never over the next row ── */
.nav-hint {
  position: fixed;
  z-index: 1000;
  max-width: 260px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--ink, #161512);
  color: #fcfcfc;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.nav-hint[hidden] { display: none; }

/* ── Layout ── */
/* style.css caps #push-tab at 580px (single-column form era). The composer
   now has a preview column and the queue/por-idioma panels are wide tables. */
#push-tab { max-width: var(--page-max, 1180px); }
#nsub-panel-promo { max-width: 640px; }
#push-tab .pcm-card label { margin-top: 0; }
#push-tab .pcm-lang-pick, #push-tab .pq-langpick, #push-tab .pcm-inline {
  text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 500; color: var(--text);
}
#push-tab .pcm-lang-pick { margin: 0; }
.pcm-step { line-height: 1.25; }
.pcm-intro { margin-bottom: 4px; }
.pcm-audience-count { margin: 0 0 14px; min-height: 1.4em; }
.pcm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.pcm-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pcm-side { position: sticky; top: 16px; min-width: 0; }
@media (max-width: 1180px) {
  .pcm-grid { grid-template-columns: minmax(0, 1fr); }
  .pcm-side { position: static; order: -1; }
}
.pcm-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
  min-width: 0;
}
.pcm-card > label, .pcm-card .pcm-row > label { margin: 0 0 12px; }
.pcm-card input:not([type=checkbox]), .pcm-card textarea, .pcm-card select { width: 100%; box-sizing: border-box; }
.pcm-step { display: block; margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.pcm-step-n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; margin-right: 8px; vertical-align: 1px;
  background: var(--app-soft); color: var(--app-strong); font-size: 12px; font-variant-numeric: tabular-nums;
}
.pcm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.pcm-head .pcm-step { margin-bottom: 8px; }
.pcm-row { display: flex; gap: 14px; flex-wrap: wrap; }
.pcm-row > label { flex: 1; min-width: 180px; }
.pcm-details { margin: 6px 0 0; }
.pcm-details > summary { cursor: pointer; font-size: 13px; color: var(--text-2); padding: 4px 0; }
.pcm-details[open] > summary { margin-bottom: 8px; }
.pcm-actions { margin: 2px 0 0; }
.pcm-schedule { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pcm-schedule > label { margin: 0; }

/* Counters: amber over the lock-screen cut, red over the hard cap. */
.pcm-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin: -4px 0 8px; }
.is-long { color: var(--warn-strong); font-weight: 600; }
.is-over { color: var(--danger-strong); font-weight: 700; }

/* ── Language selection ── */
.pcm-lang-summary { font-variant-numeric: tabular-nums; }
.pcm-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; align-items: center; }
.pcm-quick-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.pcm-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; background: var(--panel-2);
  color: var(--text-2); font-size: 12.5px; cursor: pointer; min-height: 30px;
}
.pcm-chip:hover { background: var(--panel-3); color: var(--text); }
.pcm-tr-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pcm-progress { height: 4px; border-radius: 999px; background: var(--panel-3); overflow: hidden; margin: 0 0 10px; }
.pcm-progress > span { display: block; height: 100%; width: 0; background: var(--app); transition: width .25s ease; }
.pcm-progress[hidden] { display: none; }
.pcm-warn {
  border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 12.5px; margin: 0 0 10px;
}
.pcm-warn[hidden] { display: none; }
.pcm-warn button { margin-left: 6px; }
.pcm-lang-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; }
.pcm-langs { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 460px; overflow: auto; }
.pcm-lang {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) 60px 104px minmax(118px, 1fr) auto;
  gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--border);
  font-size: 13px; cursor: pointer;
}
.pcm-lang:last-child { border-bottom: 0; }
.pcm-lang:hover { background: var(--panel-2); }
.pcm-lang.is-current { background: var(--app-soft); }
.pcm-lang.is-off { color: var(--muted); }
.pcm-lang.is-off .pcm-lang-name { text-decoration: line-through; text-decoration-color: var(--border-strong); }
.pcm-lang-pick { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; margin: 0; }
.pcm-lang-pick input { width: 16px; height: 16px; flex: none; margin: 0; }
.pcm-lang-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcm-lang-pick code { font-size: 11px; color: var(--muted); }
.pcm-lang-n { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12px; text-align: right; }
.pcm-lang-st { font-size: 11.5px; border-radius: 999px; padding: 2px 8px; text-align: center; white-space: nowrap; border: 1px solid transparent; }
.pcm-lang-st.st-ok { background: var(--success-soft); color: var(--success); }
.pcm-lang-st.st-bad { background: var(--danger-soft); color: var(--danger-strong); }
.pcm-lang-st.st-busy { background: var(--info-soft); color: var(--info); }
.pcm-lang-st.st-src { background: var(--app-soft); color: var(--app-strong); }
.pcm-lang-st.st-idle, .pcm-lang-st.st-off { border-color: var(--border); color: var(--muted); }
.pcm-lang-len { display: flex; gap: 8px; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.pcm-lang-len b { font-weight: 500; }
.pcm-lang-len b.is-long { font-weight: 700; }
.pcm-lang-act { display: flex; gap: 4px; justify-content: flex-end; }
.pcm-mini { padding: 3px 8px; font-size: 12px; min-height: 26px; }
@media (max-width: 720px) {
  .pcm-lang { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "pick n" "st len" "act act"; row-gap: 4px; }
  .pcm-lang-pick { grid-area: pick; } .pcm-lang-n { grid-area: n; } .pcm-lang-st { grid-area: st; justify-self: start; }
  .pcm-lang-len { grid-area: len; justify-self: end; } .pcm-lang-act { grid-area: act; justify-content: flex-start; }
  .pcm-langs { max-height: none; }
  .pcm-card { padding: 14px 12px; }
}

/* ── Preview card ── */
.pcm-preview-card { padding: 14px; }
.pcm-inline { display: block; margin: 0 0 10px; }
.pcm-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: var(--panel-2); }
.pcm-seg button { border: 0; background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--text-2); cursor: pointer; min-height: 26px; }
.pcm-seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.pcm-legend { margin: 8px 0 12px; }
.pcm-editor { border-top: 1px solid var(--border); padding-top: 12px; }
.pcm-editor label { margin: 0 0 8px; }
.pcm-editor input, .pcm-editor textarea { width: 100%; box-sizing: border-box; }
.pcm-editor input[readonly], .pcm-editor textarea[readonly] { background: var(--panel-2); color: var(--text-2); }
.pcm-editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── iOS lock screen mockup ── */
.ios-lock {
  --ios-material: rgba(246, 246, 248, .86);
  --ios-text: #000;
  --ios-sub: rgba(60, 60, 67, .62);
  --ios-cut: rgba(60, 60, 67, .38);
  position: relative;
  border-radius: 22px;
  padding: 18px 12px 16px;
  background: linear-gradient(160deg, #6f86d6 0%, #9a7fd6 48%, #e29ab7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  overflow: hidden;
}
.ios-lock.ios-dark {
  --ios-material: rgba(37, 37, 40, .82);
  --ios-text: #fff;
  --ios-sub: rgba(235, 235, 245, .6);
  --ios-cut: rgba(235, 235, 245, .32);
  background: linear-gradient(160deg, #1b2240 0%, #2d2346 50%, #47243a 100%);
}
.ios-lock.ios-compact { border-radius: 0; padding: 14px 12px; }
.ios-clock { text-align: center; color: rgba(255, 255, 255, .94); margin: 2px 0 18px; text-shadow: 0 1px 8px rgba(0, 0, 0, .12); }
.ios-date { font-size: 13px; font-weight: 600; text-transform: capitalize; }
.ios-time { font-size: 58px; font-weight: 700; line-height: 1.02; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.ios-notif {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 18px;
  background: var(--ios-material); color: var(--ios-text);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
}
.ios-icon { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.ios-n-text { min-width: 0; flex: 1; }
.ios-n-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ios-sub); line-height: 1.2; }
.ios-app { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ios-now { flex: none; }
.ios-n-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.ios-n-body { font-size: 14px; line-height: 1.32; margin-top: 1px; overflow-wrap: anywhere; white-space: pre-line; }
.ios-ph { color: var(--ios-sub); font-weight: 400; }
.ios-ell { color: var(--ios-text); }
.ios-cut {
  color: var(--ios-cut);
  text-decoration: line-through;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}
.pcm-legend .ios-cut { color: var(--muted); }
.ios-note {
  margin-top: 10px; padding: 7px 10px; border-radius: 12px; font-size: 12px; line-height: 1.35;
  background: rgba(0, 0, 0, .28); color: #fff;
}

/* Scheduled queue cards reuse the compact mockup. */
.pq-card .pq-phone { padding: 0; background: none; }
.pq-langpick { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; font-size: 12px; color: var(--text-2); }
.pq-langpick select { font-size: 12px; padding: 2px 6px; min-height: 28px; }
.pq-empty { padding: 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--panel-2); line-height: 1.5; }
.sched-preview { max-width: 420px; margin: 0 0 12px; border-radius: var(--radius); overflow: hidden; }

/* Rascunhos (saved push drafts). */
.pd-card { margin-bottom: 16px; }
.pd-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.pd-item { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pd-item.is-editing { outline: 2px solid var(--accent, currentColor); outline-offset: 1px; }
.pd-name { font-weight: 600; overflow-wrap: anywhere; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-2); }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pd-actions input[type="datetime-local"] { min-height: 32px; font-size: 13px; max-width: 100%; }
.pd-item .pq-phone { padding: 0; background: none; }
.pcm-check { display: flex; align-items: center; gap: 8px; flex-direction: row !important; }
.pd-save-row { margin-top: 8px; }
