/* VERSION: v1.0 | Last updated: 2026-11-11 */
/* The Agency plan (app/agency.py): the Agency pages, a client login's header, the agency's brand on a status page, and the
   Agency card on the pricing page and the signup plan picker. Its own file, loaded after style.css by the pages that use it,
   so it changes nothing anywhere else. Theme tokens only (style.css :root and [data-theme="dark"]), so dark mode follows;
   a filled surface with white text uses the *-fill tokens. */

/* ---------------------------------------------------------------- the Agency pages */
.agency-card { max-width: 880px; margin: 32px auto 60px; padding: 32px 28px; }
.agency-card h2 { margin-bottom: 6px; }
.agency-lead { margin: 0 0 6px; font-size: 14px; color: var(--text-muted); }
.agency-section { border-top: 1px solid var(--border); margin-top: 26px; padding-top: 22px; scroll-margin-top: 20px; }
.agency-section h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.agency-section > p { font-size: 14px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.55; }
.agency-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 4px; }
.agency-stat { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.agency-stat-value { font-size: 20px; font-weight: 700; color: var(--text); }
.agency-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.agency-ok { color: var(--success); background: var(--success-bg); padding: 10px 12px; border-radius: 6px; font-size: 14px; margin: 12px 0; }
.agency-warn { color: var(--warn-on-bg); background: var(--warn-bg); padding: 10px 12px; border-radius: 6px; font-size: 14px; margin: 12px 0; }
.agency-warn ul { margin: 6px 0 0; padding-left: 18px; }
.agency-small { font-size: 12.5px; color: var(--text-muted); margin: 10px 0 0; line-height: 1.5; }
.agency-row-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 4px; }
.agency-row-form label { margin-top: 0; flex: 1 1 220px; min-width: 0; }
.agency-row-form select, .agency-row-form input { margin-top: 6px; }
.agency-card .agency-btn, .agency-card button.agency-btn {
    width: auto; margin-top: 0; padding: 10px 18px; font-size: 14px; display: inline-block; flex: none;
}
.agency-card .agency-btn-small, .agency-card button.agency-btn-small {
    width: auto; margin-top: 0; padding: 7px 12px; font-size: 13px; display: inline-block; flex: none;
}
.agency-site-list { list-style: none; margin: 10px 0 0; padding: 0; }
.agency-site-list li {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    padding: 12px 0; border-top: 1px solid var(--border);
}
.agency-site-list li:first-child { border-top: none; }
.agency-site-name { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.agency-site-url { font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.agency-site-main { flex: 1 1 240px; min-width: 0; }
.agency-site-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.agency-count { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.agency-logo-preview { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 4px; }
.agency-logo-preview img { max-height: 56px; max-width: 220px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.agency-checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin-top: 12px; }
.agency-checkbox input { width: auto; margin: 0; }
.agency-card textarea {
    width: 100%; min-height: 220px; margin-top: 6px; padding: 10px 12px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); box-sizing: border-box; resize: vertical;
}
.agency-card textarea:focus { outline: none; border-color: var(--primary); }
.agency-results { list-style: none; margin: 12px 0 0; padding: 0; }
.agency-results li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.agency-results li:first-child { border-top: none; }
.agency-result-line { grid-column: 2; overflow-wrap: anywhere; color: var(--text); }
.agency-result-msg { grid-column: 2; color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.agency-badge { grid-row: span 2; align-self: start; justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.agency-badge-added { color: var(--success); background: var(--success-bg); }
.agency-badge-error { color: var(--error); background: var(--error-bg); }
.agency-badge-later, .agency-badge-no_room { color: var(--warn-on-bg); background: var(--warn-bg); }
.agency-people { list-style: none; margin: 8px 0 0; padding: 0; }
.agency-people li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.agency-people li:first-child { border-top: none; }
.agency-people form { margin: 0; }
.agency-person { min-width: 0; flex: 1 1 220px; }
.agency-person-email { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.agency-person-note { font-size: 13px; color: var(--text-muted); }
.agency-person-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.agency-card button.agency-link-btn {
    width: auto; margin: 0; padding: 0; background: none; color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: underline;
}
.agency-card button.agency-link-btn:hover { background: none; color: var(--primary-dark); }
.agency-card button.agency-link-btn.agency-danger { color: var(--error); }
@media (max-width: 480px) {
    .agency-card { margin: 16px 10px 40px; padding: 24px 16px; }
}

/* ---------------------------------------------------------------- a client login's header */
.client-header {
    display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
    padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--border);
}
.client-brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 200px; color: var(--text); }
.client-brand img { max-height: 40px; max-width: 160px; object-fit: contain; flex: none; }
.client-brand-name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; min-width: 0; }
.client-brand-by { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.client-links { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.client-links a { font-size: 14px; font-weight: 600; white-space: nowrap; }
.client-links .theme-toggle-btn, .client-links button { margin-top: 0; }

/* ---------------------------------------------------------------- the agency's brand on a public status page */
.status-brand { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.status-brand img { max-height: 44px; max-width: 200px; object-fit: contain; }
.status-brand-text { font-size: 13px; color: var(--text-muted); }

/* ---------------------------------------------------------------- the Agency card on the pricing page and plan picker */
/* A full row after the paid plans, as the Free card is, so the four (three in the picker) keep their one row. */
.pricing-pod-wide { grid-column: 1 / -1; }
.pricing-pod-wide .pricing-pod-wide-note { font-size: 12.5px; color: var(--text-muted); text-align: center; margin: 12px 0 0; }
@media (min-width: 820px) {
    .pricing-pod-wide { display: grid; grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) minmax(180px, 220px); column-gap: 32px; align-items: center; }
    .pricing-pod-wide .pricing-pod-price { margin-bottom: 6px; }
    .pricing-pod-wide .pricing-pod-note { margin: 0; min-height: 0; }
    .pricing-pod-wide .pricing-pod-features { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
    .pricing-pod-wide .pricing-pod-features li:nth-last-child(2) { border-bottom: none; }
    .pricing-pod-wide-action .cta { margin-top: 0; }
}
