/*
 * PropertyAdverts Marketing: what the marketing pages need beyond pa-v3.css and tickets.css.
 * Colour, spacing and radius come from the V3 tokens; every class here starts pm-.
 */

/* The site being worked on, in the top bar. */
.pm-site { min-width: 0; flex: 0 1 auto; max-width: 240px; }
.pm-site__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On a phone the button keeps its icon (its label says which site); the page's eyebrow names it. */
@media (max-width: 560px) { .v3-brand__div { display: none; } }
@media (max-width: 479px) { .pm-site__label { display: none; } }
.pm-sites form { margin: 0; }
.pm-sites .pt-menu-button[aria-current="true"] { background: var(--gold-soft); }
.pm-sites .pt-menu-button {
    appearance: none; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; width: 100%; text-align: left;
    display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px;
}
.pm-sites .pt-menu-button:hover { background: var(--navy-soft); }
.pm-sites .pt-menu-button strong { font-size: 14px; font-weight: 600; }
.pm-sites a { align-items: center; }

/* ---- Overview, Google, Site health and Settings (pm-) ---- */

/* Page layouts: two panels a row from 900px (a lone panel keeps the width), and a main column with a side one. */
.pm-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) {
    .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pm-grid > :only-child { grid-column: 1 / -1; }
}
.pm-split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.pm-split > * { flex: 1 1 360px; min-width: 0; }
.pm-split > :first-child { flex: 999 1 520px; }

/* Panels: a head whose action drops under the title on a phone, a second part, clipped corners. */
.pm-panel { overflow: hidden; }
.pm-head { flex-wrap: wrap; }
.pm-head > .v3-grow { flex: 1 1 180px; }
.pm-head .v3-subtle { margin: 1px 0 0; }
.pm-part { border-top: 1px solid var(--line); }
.pm-part h3 { margin: 0; font-size: 15px; font-weight: 700; }
.pm-rows { border-top: 1px solid var(--line); }
.pm-head + .pm-rows, .pm-head + .pt-inline { border-top: 0; }
.pm-inline > .v3-field__error { flex-basis: 100%; }
.pm-off strong { color: var(--muted); font-weight: 600; }

/* Section tabs (Google, Settings): the desk strip, marked by aria-current. */
.pm-tabs .v3-state { min-height: 40px; }
.pm-tabs .v3-state[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (max-width: 899px) { .pm-tabs .v3-state { min-height: 44px; } }

/* Figures inside a panel: report tiles, two a row, four on the wide panels. */
.pm-stats { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.pm-stats .v3-tile { min-width: 0; padding: 11px 13px; border-radius: 11px; background: var(--card-soft); box-shadow: none; }
.pm-stats .v3-tile dd { overflow-wrap: anywhere; }
@media (min-width: 560px) { .pm-stats--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pm-change { font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-change.is-up { color: var(--ok); }
.pm-change.is-down { color: var(--crit); }
.pm-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pm-dot--ok { background: var(--ok); }
.pm-dot--warn { background: var(--warn); }

.pm-chart { margin: 14px 0 0; display: grid; gap: 6px; }
.pm-chart svg { display: block; width: 100%; height: 72px; color: var(--gold); border-bottom: 1px solid var(--line-strong); }
.pm-chart rect { fill: currentColor; }
.pm-chart figcaption { font-size: 12.5px; color: var(--muted); }

.pm-buckets { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pm-buckets li { display: flex; gap: 8px; align-items: center; }
.pm-buckets strong { font-size: 15px; font-variant-numeric: tabular-nums; }

/* A core term in Rankings: its position, what it is doing, the advice and its ticket. */
.pm-term { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px 12px; padding: 14px 16px; }
.pm-term > :not(.pm-rank) { grid-column: 2; min-width: 0; }
.pm-rank { grid-row: 1; display: grid; place-items: center; height: 40px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-term__copy strong { display: block; font-size: 14.5px; font-weight: 650; overflow-wrap: anywhere; }
.pm-term__copy small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.pm-term__copy .v3-pill { margin-right: 4px; }
.pm-advice { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13.5px; line-height: 1.5; }
.pm-acts:empty { display: none; }
@media (max-width: 559px) {
    .pm-term { grid-template-columns: 44px minmax(0, 1fr); padding-inline: 14px; }
}

/* Problems and page lists that open in place. */
.pm-issue > .v3-quiet__toggle { min-height: 48px; }
.pm-head + .pm-issue > .v3-quiet__toggle, .pm-head + .pm-issues > .pm-issue:first-child > .v3-quiet__toggle { border-top: 0; }
.pm-issue__title { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.pm-issue__body { display: grid; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.pm-pages { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pm-pages li { display: grid; gap: 1px; min-width: 0; font-size: 14px; }
.pm-pages a, .pm-pages span { overflow-wrap: anywhere; }
.pm-pages small { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

/* Settings: the core terms as removable chips, and the Google setup steps. */
.pm-termlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.pm-termlist li { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-height: 44px; padding: 3px 3px 3px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--card-soft); font-size: 14px; }
.pm-termlist li > span { min-width: 0; overflow-wrap: anywhere; }
.pm-termlist small { font-size: 12.5px; color: var(--muted); }
.pm-termlist form { margin: 0; }
.pm-siteform { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .pm-siteform { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pm-steps li + li { margin-top: 7px; }
