/* MISSION 66 (W1-D) -- terms & consent (R920 S028 "תנאים" section, S013 modal_terms).
   JS-free modal: the panel is hidden until its id is the URL fragment (:target);
   every close control is a link back to the consent block's anchor. Reuses
   site.css tokens (--surface, --pb-danger, --radius-card, --space-*). */

.pb-terms-consent { margin: var(--space-5, 20px) 0; }
.pb-terms-consent-title { font-size: 1rem; margin: 0 0 8px; }
.pb-terms-consent-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; cursor: pointer; }
.pb-terms-consent-check input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.pb-terms-consent-meta { margin: 6px 0 0; }
.pb-terms-blocked { margin: 0; }

.pb-terms-sandbox-banner {
    background: var(--pb-danger);
    color: var(--pb-surface);
    border-radius: var(--radius-card, 12px);
    padding: 10px 14px;
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 0.9rem;
}

.pb-terms-meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 0.9rem; }
.pb-terms-meta dt { color: var(--text-secondary); }
.pb-terms-meta dd { margin: 0; font-weight: 600; }

/* ---- modal (hidden until :target) ---- */
.pb-terms-modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; }
.pb-terms-modal:target { display: flex; }
.pb-terms-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.pb-terms-modal-panel {
    position: relative;
    background: var(--surface);
    color: var(--text-primary);
    border-radius: var(--radius-card, 12px);
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 20px 22px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}
.pb-terms-modal-panel h2 { margin: 0 0 12px; padding-inline-end: 32px; }
.pb-terms-modal-close {
    position: absolute; top: 10px; inset-inline-start: 12px;
    font-size: 1.6rem; line-height: 1; text-decoration: none; color: var(--text-secondary);
}
.pb-terms-modal-body { overflow: auto; flex: 1 1 auto; min-height: 0; padding-inline-end: 6px; }
.pb-terms-modal-body h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.pb-terms-modal-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---- public /terms, /privacy, /Legal/Document ---- */
.pb-legal-doc { max-width: 820px; margin: 0 auto; }

/* ---- /AdminLegal ---- */
.pb-admin-legal-group { margin-bottom: 16px; }
.pb-admin-legal-sandbox { color: var(--pb-danger); font-weight: 700; }
.pb-admin-legal-sandbox-row td { opacity: 0.85; }

@media (max-width: 767px) {
    .pb-terms-modal-panel { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 16px; }
    .pb-terms-meta { grid-template-columns: 1fr; }
}
