/* =============================================================================
   Settings > Agent Meeko Phone (16 Nov 2026): the shell, the Setup checklist,
   Security Check and Call Handling. AM Navy, tokens only.

   The cards themselves are the shared gs-card vr-card; this sheet adds the
   head with its icon in a soft badge, the module tabs as soft pills, and the
   checklist. Inbound, Outbound and What Meeko Knows style their own bodies in
   meeko-phone-pages.css.
   ============================================================================= */

/* ---- The header: the page's title and line, then room before the first card ---- */
.mp-header .page-header__text { min-width: 0; }
.mp-scroll { padding-top: var(--content-gap-top, 24px); }

.mp-badge {
    display: inline-grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: var(--radius-chip);
    background: var(--accent-tint); color: var(--accent);
}

/* ---- Module tabs: the app's own record tabs, underlined ---------------------- */
.record-tabs.mp-tabs { margin: 0 0 var(--gutter-tight); padding: 0; }
.record-tabs.mp-tabs[hidden] { display: none; }
.record-tabs.mp-tabs .record-tab:focus-visible { outline: none; box-shadow: var(--am-focus); border-radius: 4px; }

/* ---- One card per part ------------------------------------------------------ */
.mp-page { min-width: 0; }
.mp-card { min-width: 0; }
.mp-card__head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.mp-card__heading { min-width: 0; flex: 1 1 auto; }
.mp-card__title { margin: 0; }
.mp-card__hint { margin: 3px 0 0; }
.mp-card__action { margin-top: 14px; }
.mp-card .vr-grid { margin-top: 14px; }
.mp-hint { margin-top: 10px; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mp-page > .gs-notice { margin-bottom: var(--gutter-tight); }
.mp-switch-row { margin-top: 10px; }

/* ---- Setup: the checklist --------------------------------------------------- */
.mp-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.mp-progress__label { flex: none; font-size: var(--font-size-small); color: var(--text-secondary); }
.mp-progress__label strong { color: var(--text-primary); }
.mp-progress__bar {
    position: relative; flex: 1 1 auto; height: 6px; overflow: hidden;
    border-radius: var(--radius-pill); background: var(--accent-tint);
}
.mp-progress__fill {
    position: absolute; inset: 0 auto 0 0; border-radius: var(--radius-pill); background: var(--status-success);
    transition: width var(--duration-quick) var(--easing-standard);
}

.mp-checklist { list-style: none; margin: 14px 0 0; padding: 0; }
.mp-check {
    display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px;
    padding: 16px 0; min-width: 0;
}
.mp-check + .mp-check { border-top: var(--divider-width, 1px) solid var(--divider-colour, var(--border-subtle)); }
.mp-check__tick {
    display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px;
    border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface-panel); color: var(--text-on-dark);
}
.mp-check--done .mp-check__tick { border-color: var(--status-success); background: var(--status-success); }
.mp-check--unknown .mp-check__tick { border-style: dashed; }

.mp-check__body {
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 10px 20px; min-width: 0;
}
.mp-check__text { min-width: 0; }
.mp-check__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mp-check__title { font-size: var(--font-size-base); font-weight: 600; color: var(--text-primary); }
.mp-check__hint { margin: 4px 0 0; }
.mp-check__state {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-chip);
    font-size: var(--font-size-tiny); font-weight: 600;
}
.mp-check__state--done { background: var(--status-success-tint); color: var(--status-success); }
.mp-check__state--todo { background: var(--status-warning-tint); color: var(--status-warning-ink); }
.mp-check__state--unknown { background: var(--status-neutral-tint); color: var(--status-neutral); }
.mp-check__field { min-width: 0; }
.mp-check__field .mp-switch-row { margin-top: 0; }
.mp-check__field .gs-hint { margin: 0; }

.mp-field--short { max-width: 220px; }
.mp-address { margin: 0; }
.mp-address__value { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.mp-line-login .rmt-line-login__fields { margin-top: 0; }
.mp-call-fact { margin: 0; }

/* Setup without Virtual Receptionist: what it is, in three steps. */
.mp-intro-steps { list-style: none; display: grid; gap: 12px; margin: 16px 0 0; padding: 0; }
.mp-intro-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.mp-intro-steps strong { display: block; font-size: var(--font-size-base); }
.mp-intro-steps span:not(.mp-intro-steps__number) { color: var(--text-secondary); font-size: var(--font-size-small); }
.mp-intro-steps__number {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent-tint); color: var(--accent); font-size: var(--font-size-small); font-weight: 700;
}
.mp-steps { margin-top: 14px; }
.mp-minutes { margin: 12px 0 0; font-size: var(--font-size-medium); font-weight: 600; color: var(--text-primary); }

/* ---- Soft tick chips (the security questions, a department's people) -------- */
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mp-chip {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    min-height: var(--control-height-small); padding: 0 12px;
    border: 1px solid var(--border-default); border-radius: var(--radius-chip); background: var(--surface-panel);
    transition: background-color var(--duration-instant) var(--easing-standard), border-color var(--duration-instant) var(--easing-standard);
}
.mp-chip:has(input:checked) { border-color: var(--accent-border); background: var(--accent-tint); color: var(--accent); }
.mp-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-chips[hidden] { display: none; }

.mp-security__rules { max-width: 720px; }
.mp-people-picker { margin-top: 14px; }

/* ---- Services and treatments: a line saying what is chosen, the list in the side panel ---- */
.mpp-summary { margin: 10px 0 0; color: var(--text-secondary); font-size: var(--font-size-small); overflow-wrap: anywhere; }
.mpp-panel { display: grid; gap: 12px; min-width: 0; }
.mpp-panel .mpp-chips { margin-top: 0; }

/* ---- Who can take calls: each person stacked, the pickers one width ---------- */
.mp-routes { display: grid; gap: 0; margin-top: 12px; }
.mp-routes .rmt-route {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 560px;
    padding: 14px 0; border-bottom: 1px solid var(--border-subtle);
}
.mp-routes .rmt-route:last-child { border-bottom: 0; }
.mp-routes .rmt-route__name { font-weight: 600; color: var(--text-primary); }
.mp-routes .rmt-route > * { min-width: 0; width: 100%; }
.mp-route-add { max-width: 560px; }

/* ---- Tablet and phone --------------------------------------------------------- */
@media (max-width: 900px) {
    .mp-check__body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
    .mp-scroll { padding-top: 16px; }
    .mp-routes .rmt-route, .mp-route-add { max-width: none; }
    .mp-card__head { gap: 10px; }
    .mp-check { grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
    .mp-check__tick { width: 22px; height: 22px; }
    .mp-field--short { max-width: none; }
    .mp-actions .am-btn { flex: 1 1 auto; }
    .mp-chip { flex: 1 1 100%; }
    /* iOS zooms the page when a focused control is smaller than 16px. */
    .mp-page input, .mp-page select, .mp-page textarea { font-size: 16px; }
}

/* Grid and flex displays would otherwise beat the hidden attribute. */
.mp-page [hidden] { display: none; }
.mp-card .gs-notice { margin: 12px 0 0; }

/* Settings > Modules: a module's links to its Agent Meeko Phone page, under its name. */
.mx-phone-links { margin: 12px 0 4px; }
