/* The shop number: Inbox (texts and calls), the number wizard, the order page's texts. */
:root {
  --ph-out: #1f3d2b;
  --ph-in: #eef0ec;
  --ph-line: rgba(0, 0, 0, .08);
  --ph-muted: #616a63;
  --ph-blush: #e8a0a8;
  --ph-red: #c4314b;
  --ph-soft: #f6f2ec;
}

.ph-demo-note { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: #fff7e0; color: #6b5000; font: 13px/1.4 system-ui, sans-serif; }
s-banner + .ph-inbox, s-banner + s-banner { margin-top: 12px; }

/* ---------- Inbox ---------- */
.ph-inbox { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; height: calc(100vh - 190px); min-height: 520px; max-height: 860px; margin-top: 12px;
  background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 0 0 1px var(--ph-line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; font-size: 14px; color: #1d1f1d; }
.ph-list { display: flex; flex-direction: column; border-right: 1px solid var(--ph-line); min-height: 0; background: #fbfaf8; }
.ph-list-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.ph-tabs { flex: 1; display: grid; grid-template-columns: 1fr 1fr; background: rgba(0, 0, 0, .05); border-radius: 10px; padding: 2px; }
.ph-tabs button { border: 0; background: transparent; border-radius: 8px; padding: 6px 8px; font-weight: 600; font-family: inherit; font-size: 13px; line-height: 1.2; color: var(--ph-muted); cursor: pointer; }
.ph-tabs button[aria-selected="true"] { background: #fff; color: #1d1f1d; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ph-count:not(:empty) { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--ph-red); color: #fff; font-size: 11px; line-height: 18px; }
.ph-icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .05); color: var(--ph-out); font-size: 16px; cursor: pointer; text-decoration: none; }
.ph-icon-button svg { width: 17px; height: 17px; }
.ph-icon-button:hover { background: rgba(31, 61, 43, .12); }
.ph-search { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; padding: 0 10px; border-radius: 10px; background: rgba(0, 0, 0, .05); color: var(--ph-muted); }
.ph-search input { flex: 1; border: 0; background: transparent; padding: 8px 0; font-family: inherit; font-size: inherit; outline: none; min-width: 0; }
.ph-rows { flex: 1; overflow-y: auto; padding: 0 6px; }
.ph-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
.ph-row:hover { background: rgba(0, 0, 0, .04); }
.ph-row.is-open { background: rgba(31, 61, 43, .1); }
.ph-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-row-top { display: flex; justify-content: space-between; gap: 8px; }
.ph-row-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ph-row-top strong.is-missed { color: var(--ph-red); }
.ph-row-top time { flex: none; color: var(--ph-muted); font-size: 12px; }
.ph-row-text { color: var(--ph-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.ph-row.is-unread .ph-row-top strong { font-weight: 750; }
.ph-row.is-unread .ph-row-text { color: #1d1f1d; }
.ph-you { color: var(--ph-muted); }
.ph-dot { width: 10px; height: 10px; border-radius: 50%; background: #2c6ecb; }
.ph-tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(196, 49, 75, .1); color: var(--ph-red); font-size: 11px; font-weight: 600; }
.ph-none { padding: 24px 16px; color: var(--ph-muted); text-align: center; line-height: 1.5; }
.ph-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #f3c6cc, #e8a0a8); color: #5a2630; font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.ph-avatar.is-muted { background: #e4e4e1; color: #8a8f8b; }
.ph-call-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 61, 43, .08); color: var(--ph-out); font-weight: 700; }
.ph-call-icon.is-missed, .ph-call-icon.is-ringing { background: rgba(196, 49, 75, .1); color: var(--ph-red); transform: rotate(180deg); }
.ph-call-icon.is-voicemail { background: rgba(196, 49, 75, .1); color: var(--ph-red); font-size: 12px; }
.ph-list-foot { padding: 10px 14px 12px; border-top: 1px solid var(--ph-line); display: flex; flex-direction: column; gap: 6px; }

.ph-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; }
.ph-pane-empty { margin: auto; text-align: center; color: var(--ph-muted); }
.ph-pane-empty div { font-size: 40px; margin-bottom: 6px; }
.ph-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ph-line); }
.ph-thread-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-thread-title strong { font-size: 16px; font-weight: 650; }
.ph-thread-title span { color: var(--ph-muted); font-size: 12.5px; }
.ph-thread-actions { display: flex; gap: 6px; }
.ph-back { display: none; border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--ph-out); cursor: pointer; padding: 0 4px; }
.ph-chips { display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--ph-line); overflow-x: auto; }
.ph-chip { flex: none; border: 1px solid var(--ph-line); background: var(--ph-soft); border-radius: 999px; padding: 5px 11px; font-family: inherit; font-size: 12.5px; line-height: 1.2; color: #1d1f1d; cursor: pointer; }
.ph-chip:hover { border-color: var(--ph-out); }
.ph-to { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--ph-line); color: var(--ph-muted); }
.ph-to input { flex: 1; border: 0; font-family: inherit; font-size: 15px; line-height: 1.4; outline: none; padding: 4px 0; }

.ph-messages { flex: 1; overflow-y: auto; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 3px; }
.ph-messages.is-mini { max-height: 320px; padding: 8px 0; flex: none; }
.ph-day { align-self: center; margin: 12px 0 6px; color: var(--ph-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ph-msg { display: flex; flex-direction: column; max-width: min(72%, 460px); }
.ph-msg.is-in { align-self: flex-start; align-items: flex-start; }
.ph-msg.is-out { align-self: flex-end; align-items: flex-end; }
.ph-bubble { padding: 8px 13px; border-radius: 18px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.ph-msg.is-in .ph-bubble { background: var(--ph-in); color: #1d1f1d; border-bottom-left-radius: 6px; }
.ph-msg.is-out .ph-bubble { background: var(--ph-out); color: #fff; border-bottom-right-radius: 6px; }
.ph-msg + .ph-msg { margin-top: 4px; }
.ph-media img { display: block; max-width: 240px; max-height: 260px; border-radius: 16px; margin-bottom: 3px; object-fit: cover; }
.ph-kind { font-size: 11px; color: var(--ph-muted); margin: 0 6px 2px; }
.ph-kind.is-stop { color: var(--ph-red); font-weight: 600; margin-top: 2px; }
.ph-status { font-size: 11px; color: var(--ph-muted); margin: 3px 6px 0; }
.ph-status.is-failed { color: var(--ph-red); }

.ph-callcard { align-self: center; width: min(100%, 460px); margin: 10px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ph-line); background: #fbfaf8; display: flex; flex-direction: column; gap: 10px; }
.ph-callcard.is-inline { align-self: center; }
.ph-callcard-head { display: flex; align-items: center; gap: 8px; }
.ph-callcard-head strong { flex: 1; font-weight: 600; }
.ph-callcard-head time { color: var(--ph-muted); font-size: 12px; }
.ph-callcard.is-missed .ph-callcard-head strong, .ph-callcard.is-voicemail .ph-callcard-head strong { color: var(--ph-red); }
.ph-play { align-self: flex-start; border: 0; border-radius: 999px; padding: 7px 14px; background: var(--ph-out); color: #fff; font-weight: 600; font-family: inherit; font-size: 13px; line-height: 1; cursor: pointer; }
.ph-audio { width: 100%; height: 36px; }
.ph-summary, .ph-ai-upsell { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #fdf3f4, #f4f7f1); }
.ph-summary p, .ph-ai-upsell p { margin: 2px 0 0; line-height: 1.45; color: #3b403c; }
.ph-spark { font-size: 16px; }
.ph-transcript summary { cursor: pointer; color: var(--ph-out); font-weight: 600; font-size: 13px; }
.ph-transcript p { margin: 6px 0 0; line-height: 1.5; color: #3b403c; font-style: italic; }
.ph-call-detail { padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.ph-call-detail .ph-callcard { align-self: stretch; width: auto; margin: 0; background: #fff; }
.ph-call-actions { display: flex; gap: 8px; }

.ph-composer { border-top: 1px solid var(--ph-line); padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.ph-quicks { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.ph-quick { flex: none; border: 1px solid var(--ph-line); background: #fff; border-radius: 999px; padding: 6px 12px; font-family: inherit; font-size: 13px; line-height: 1.2; color: #1d1f1d; cursor: pointer; }
.ph-quick:hover { border-color: var(--ph-out); }
.ph-quick.is-ai { border-color: transparent; background: linear-gradient(135deg, #fbe3e6, #e7f0e4); font-weight: 600; }
.ph-quick.is-edit { color: var(--ph-muted); border-style: dashed; }
.ph-ai-upsell { position: relative; padding-right: 36px; }
.ph-ai-upsell[hidden] { display: none; }
.ph-ai-upsell s-button { margin-left: auto; align-self: center; }
.ph-close { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; font-size: 18px; color: var(--ph-muted); cursor: pointer; }
.ph-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.ph-compose-row textarea { flex: 1; resize: none; border: 1px solid var(--ph-line); border-radius: 20px; padding: 9px 14px; font-family: inherit; font-size: 15px; line-height: 1.4; outline: none; max-height: 160px; background: #fbfaf8; }
.ph-compose-row textarea:focus { border-color: var(--ph-out); background: #fff; }
.ph-send { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: var(--ph-out); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.ph-send:disabled { background: #c9cec9; cursor: default; }
.ph-compose-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--ph-muted); font-size: 11.5px; padding: 0 6px; }
.ph-compose-foot .is-warn { color: #8a5a00; }
.ph-locked { margin: 10px 16px 14px; padding: 12px 14px; border-radius: 12px; background: rgba(196, 49, 75, .07); color: #7a2232; line-height: 1.45; }

.ph-meter { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ph-meter-row { font-size: 14px; }
.ph-meter-row span { color: var(--ph-muted); }
.ph-meter-bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.ph-meter-bar span { display: block; height: 100%; border-radius: 3px; background: var(--ph-out); transition: width .6s ease; }
.ph-meter.is-full .ph-meter-bar span { background: var(--ph-red); }
.ph-meter.is-compact .ph-meter-row { font-size: 12.5px; }

.ph-dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ph-dialog::backdrop { background: rgba(20, 30, 24, .35); }
.ph-dialog-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; max-height: 80vh; overflow-y: auto; }
.ph-dialog h2 { margin: 0; font-size: 18px; }
.ph-replies { display: flex; flex-direction: column; gap: 10px; }
.ph-reply-edit { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px; border-radius: 12px; background: var(--ph-soft); }
.ph-reply-edit input, .ph-reply-edit textarea { font-family: inherit; font-size: inherit; border: 1px solid var(--ph-line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.ph-reply-edit textarea { grid-column: 1 / -1; resize: vertical; }
.ph-remove, .ph-link { border: 0; background: transparent; color: var(--ph-red); cursor: pointer; font-family: inherit; font-size: inherit; }
.ph-link { color: var(--ph-out); font-weight: 600; align-self: flex-start; padding: 4px 0; }
.ph-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.ph-button { border: 1px solid var(--ph-line); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; font-family: inherit; font-size: 14px; line-height: 1; cursor: pointer; }
.ph-button.is-primary { background: var(--ph-out); border-color: var(--ph-out); color: #fff; }

/* ---------- Get a number ---------- */
.ph-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 10px; max-width: 560px; margin: 0 auto; }
.ph-hero-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, #fbe3e6, #e7f0e4); }
.ph-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 14px; flex-wrap: wrap; font: 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ph-steps li { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px; background: #fff; color: var(--ph-muted); box-shadow: 0 0 0 1px var(--ph-line); }
.ph-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .06); font-weight: 700; font-size: 12px; }
.ph-steps li.is-now { color: #1d1f1d; font-weight: 600; box-shadow: 0 0 0 1.5px var(--ph-out); }
.ph-steps li.is-now span { background: var(--ph-out); color: #fff; }
.ph-steps li.is-done span { background: var(--ph-out); color: #fff; }
.ph-steps li.is-wait span { background: #fff1c2; color: #6b5000; }
.ph-search-row { display: flex; gap: 10px; align-items: flex-end; margin: 12px 0; max-width: 420px; }
.ph-search-row s-text-field { flex: 1; }
.ph-numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.ph-number { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--ph-line); background: #fff; text-align: left; cursor: pointer; font: 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ph-muted); transition: border-color .15s, transform .15s; }
.ph-number strong { font-size: 18px; color: #1d1f1d; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ph-number:hover { border-color: rgba(31, 61, 43, .4); transform: translateY(-1px); }
.ph-number.is-picked { border-color: var(--ph-out); background: rgba(31, 61, 43, .05); box-shadow: 0 0 0 3px rgba(31, 61, 43, .12); }
.ph-confirm { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--ph-soft); flex-wrap: wrap; }
.ph-confirm strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.ph-number-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ph-number-hero > div:nth-child(2) { flex: 1; }
.ph-big-number { margin: 2px 0 6px; line-height: 1.1; font-size: 30px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: #1d1f1d; }
.ph-badges { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.ph-why { padding: 12px 14px; border-radius: 12px; background: var(--ph-soft); line-height: 1.5; font-size: 13.5px; margin-bottom: 8px; }
.ph-form h3 { font-size: 14px; margin: 18px 0 8px; }
.ph-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ph-grid-4 { display: grid; grid-template-columns: 2fr 1.2fr .7fr .8fr; gap: 12px; }
.ph-span-2 { grid-column: span 1; }
.ph-form [hidden] { display: none; }
.ph-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ph-errors:not(:empty) { margin-top: 12px; }
.ph-reg-done, .ph-reg-wait { display: flex; gap: 12px; align-items: flex-start; }
.ph-reg-wait { flex-direction: column; }
.ph-reg-done > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ph-out); color: #fff; font-weight: 700; flex: none; }
.ph-timeline { display: flex; gap: 0; width: 100%; max-width: 520px; }
.ph-timeline span { flex: 1; position: relative; padding-top: 18px; font-size: 12.5px; color: var(--ph-muted); }
.ph-timeline span::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .08); margin-right: 6px; }
.ph-timeline .is-done::before { background: var(--ph-out); }
.ph-timeline .is-now { color: #1d1f1d; font-weight: 600; }
.ph-timeline .is-now::before { background: linear-gradient(90deg, var(--ph-out) 50%, rgba(0, 0, 0, .08) 50%); }
.ph-ring { display: flex; flex-direction: column; gap: 2px; margin: 10px 0; }
.ph-ring-row { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--ph-line); cursor: pointer; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ph-ring-row input { width: 18px; height: 18px; accent-color: var(--ph-out); }
.ph-switch { display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ph-switch input { position: absolute; opacity: 0; }
.ph-switch span { width: 42px; height: 26px; border-radius: 13px; background: #c9cec9; position: relative; transition: background .2s; }
.ph-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.ph-switch input:checked + span { background: var(--ph-out); }
.ph-switch input:checked + span::after { transform: translateX(16px); }
.ph-switch input:focus-visible + span { outline: 2px solid var(--ph-out); outline-offset: 2px; }
.ph-preview-bubble { max-width: 360px; margin: 12px 0; padding: 9px 13px; border-radius: 18px 18px 6px 18px; background: var(--ph-out); color: #fff; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin-left: auto; white-space: pre-wrap; }
.ph-legal { display: flex; gap: 16px; margin-top: 8px; }
.ph-legal a { color: var(--ph-out); font-weight: 600; }

/* ---------- order page ---------- */
.ph-order-texts { display: flex; flex-direction: column; gap: 8px; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ph-order-texts .ph-composer { border: 1px solid var(--ph-line); border-radius: 14px; }

@media (max-width: 760px) {
  .ph-inbox { grid-template-columns: 1fr; height: calc(100vh - 120px); position: relative; }
  .ph-pane { position: absolute; inset: 0; transform: translateX(100%); transition: transform .25s ease; z-index: 2; }
  .ph-pane.is-active { transform: none; }
  .ph-back { display: block; }
  .ph-msg { max-width: 82%; }
  .ph-grid-2, .ph-grid-4 { grid-template-columns: 1fr; }
  .ph-compose-foot span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ph-pane, .ph-number, .ph-meter-bar span, .ph-switch span, .ph-switch span::after { transition: none; } }
