/* ==========================================================================
   Security & Compliance (/security), the trust centre
   The page's own parts on top of the shared Toybox Calm look (assets/css/toybox-calm.css, loaded first by
   _ToyboxCalmHead): the cards that open a dialog (compliance reports and subprocessors), the document rows, the
   dialogs themselves (the layout's Bootstrap 5 modals in the family's look) and the policy request's checklist and
   form. Every class starts with trc-. Views/Public/TrustCentre.cshtml links it in its FinalHeader section with a ?v=
   cache buster from StaticAssetVersion; Scripts/trust-centre/trust-centre.js runs the dialogs' buttons.
   ========================================================================== */

/* ---------- Cards that open a dialog: a logo, the name (the button, which covers the card) and an open icon ---------- */
.trc-card { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 96px; padding: 14px 16px; background: #fff; border: 3px solid var(--tc-ink); border-radius: 20px; box-shadow: 0 4px 0 var(--tc-ink); transition: transform .15s ease, box-shadow .15s ease; }
.trc-card:hover, .trc-card:focus-within { transform: translateY(-3px); box-shadow: 0 7px 0 var(--tc-ink); }
/* Keeps the pointer over the card when the lift moves its bottom edge away, so :hover doesn't flicker */
.trc-card::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.trc-card--cert { min-height: 104px; }
.tc-root .trc-logo { flex: none; display: block; width: 56px; height: 56px; border: 2px solid var(--tc-ink); border-radius: 50%; background: #fff; object-fit: cover; }
.tc-root .trc-card--cert .trc-logo { width: 64px; height: 64px; }
.trc-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.trc-card__btn { padding: 0; border: 0; background: none; font: 700 1.1875rem/1.25 var(--tc-display); color: var(--tc-ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.trc-card__btn::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 17px; }
.trc-card:hover .trc-card__btn { text-decoration: underline; text-decoration-color: var(--tc-yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.tc-root .trc-card__btn:focus-visible { outline: none; box-shadow: none; }
.tc-root .trc-card__btn:focus-visible::after { outline: 3px solid var(--tc-ink); outline-offset: 5px; box-shadow: 0 0 0 9px var(--tc-yellow); }
.trc-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: .875rem; line-height: 1.4; color: var(--tc-ink-2); }
.trc-card__meta b { color: var(--tc-ink); }
.trc-card__open { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--tc-ink); border-radius: 50%; background: var(--tc-yellow); font-size: 1.15rem; color: var(--tc-ink); transition: background-color .2s ease; }
.trc-card:hover .trc-card__open { background: #FFD776; }

/* ---------- Legal documents and security policies: one row per document ---------- */
/* Side by side once each card is wide enough for the longer names on one or two lines */
@media (min-width: 900px) { .trc-docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trc-docs-card { display: flex; flex-direction: column; }
.trc-docs { display: grid; gap: 10px; margin: 8px 0 0; }
.trc-doc { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; margin: 0; padding: 8px 14px 8px 8px; border: 2px solid var(--tc-ink); border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--tc-ink); font: 600 1.0625rem/1.3 var(--tc-display); color: var(--tc-ink); text-align: left; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .2s ease; }
.trc-doc:hover, .trc-doc:focus { color: var(--tc-ink); text-decoration: none; background: var(--tc-butter); }
.trc-doc:hover { transform: translateY(-2px); }
.trc-doc__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--tc-ink); border-radius: 11px; background: var(--a, var(--tc-sky)); background-image: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%); font-size: 1.2rem; color: var(--tc-ink); }
.trc-doc__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.trc-doc__go { margin-left: auto; font-size: 1.25rem; color: var(--tc-muted); }
/* View More: the family's arrow link, as a button; its hit area reaches 44px tall */
.trc-more { position: relative; align-self: flex-start; margin: 22px 0 4px; padding: 0 0 2px; border-top: 0; border-left: 0; border-right: 0; background: none; cursor: pointer; }
.trc-more::before { content: ""; position: absolute; inset: -12px -8px -10px; }

/* ---------- Security controls: two columns between the phone and desktop layouts ---------- */
@media (min-width: 640px) and (max-width: 991.98px) { .trc-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 22px; } }
.trc-controls .tc-ticks { margin: 0; }

/* ---------- Additional information (the dark panel) ---------- */
.trc-info p { max-width: 62rem; }
.trc-info p:last-child { margin-bottom: 0; }

/* ==========================================================================
   DIALOGS: the layout's Bootstrap 5 modals (.modal, .modal-dialog, .modal-content, .modal-body keep their behaviour:
   centring, scrolling, the backdrop) in the family's look: an ink outline, an offset shadow and a pale head strip.
   ========================================================================== */
.trc-dialog .modal-content { overflow: hidden; padding: 0; border: 3px solid var(--tc-ink); border-radius: 24px; background: #fff; box-shadow: 0 8px 0 var(--tc-ink); color: var(--tc-ink); }
.trc-dialog__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--tc-sky-0); border-bottom: 3px solid var(--tc-ink); }
@media (min-width: 768px) { .trc-dialog__head { padding: 14px 16px 14px 22px; } }
.tc-root .trc-dialog__head .trc-logo { width: 44px; height: 44px; }
.trc-dialog__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--tc-ink); border-radius: 14px; background: var(--tc-yellow); background-image: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%); font-size: 1.4rem; color: var(--tc-ink); }
.trc-dialog__titles { flex: 1; min-width: 0; }
.trc-dialog__title { flex: 1; min-width: 0; margin: 0; font: 700 1.25rem/1.25 var(--tc-display); color: var(--tc-ink); overflow-wrap: anywhere; }
@media (min-width: 768px) { .trc-dialog__title { font-size: 1.375rem; } }
.trc-dialog__sub { margin: 2px 0 0; font-size: .9375rem; font-weight: 600; color: var(--tc-ink-2); }
.trc-dialog__sub b { color: var(--tc-ink); font-variant-numeric: tabular-nums; }
.trc-dialog__close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0 0 3px; border: 2px solid var(--tc-ink); border-radius: 50%; background: #fff; box-shadow: 0 3px 0 var(--tc-ink); font: 600 1.75rem/1 var(--tc-display); color: var(--tc-ink); cursor: pointer; transition: background-color .2s ease; }
.trc-dialog__close:hover { background: var(--tc-butter); }
/* The 2025 layout's themes pad .modal-content and pull .modal-body out by the same 24px: neither here */
.trc-dialog .modal-body { margin: 0; }
.trc-dialog__body { padding: 20px 18px 22px; }
@media (min-width: 768px) { .trc-dialog__body { padding: 26px 28px 28px; } }
.trc-dialog .tc-prose { font-size: 1rem; }
.trc-dialog hr { height: 0; margin: 24px 0; border: 0; border-top: 2px dashed rgba(47, 42, 79, .3); background: none; opacity: 1; }
/* "Data Processed" and "Data Location": the subprocessor's summary at the end of its dialog */
.trc-meta { margin: 18px 0 0; padding: 12px 16px; border: 2px dashed rgba(47, 42, 79, .35); border-radius: 14px; background: var(--tc-sky-0); font-size: .9375rem; line-height: 1.55; }
.trc-meta p { margin: 0; }
.trc-meta p + p { margin-top: 6px; }
.trc-meta b { color: var(--tc-ink); }
.trc-dialog__foot { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px 14px; padding: 14px 16px 20px; border-top: 2px solid var(--tc-line); background: #fff; }
@media (min-width: 768px) { .trc-dialog__foot { padding: 16px 24px 22px; } }
.trc-dialog__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 14px; }
/* Long labels ("Sign in to your CanIPhish Account to Download") wrap rather than overflow a phone-width dialog */
.trc-dialog__foot .tc-btn { white-space: normal; text-align: center; line-height: 1.15; }

/* The SOC 2 terms: the checkbox under the legal text. The label is the whole row (44px tall), so all of it ticks the box */
.trc-terms { margin-top: 20px; padding-top: 7px; border-top: 2px solid var(--tc-line); }
.trc-terms > .tc-check { min-height: 44px; padding: 11px 0; }

/* ---------- The policy request: step one's checklist, step two's form ---------- */
/* Each row is a label holding its checkbox: the whole row, at least 44px tall, ticks the box */
.trc-checks { display: grid; }
.trc-checks > .tc-check { min-height: 44px; padding: 11px 2px; }
.trc-checks > .tc-check + .tc-check { border-top: 2px solid var(--tc-line); }
.trc-picked { margin: 0 0 20px; }
.trc-picked .tc-chip { white-space: normal; background: var(--tc-butter); box-shadow: none; }
.trc-fields { display: grid; gap: 0 18px; }
@media (min-width: 640px) { .trc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trc-error { color: #B3261E; font-weight: 600; }
.trc-root .tc-select[aria-invalid="true"] { border-color: #B3261E; box-shadow: 0 3px 0 #B3261E; }
.trc-captcha { margin-top: 4px; min-height: 78px; }
/* The reCAPTCHA box is 304px wide: scaled to fit the narrowest dialogs */
@media (max-width: 379.98px) { .trc-captcha .g-recaptcha { transform: scale(.86); transform-origin: 0 0; } }
/* A request that went through */
.tc-root .trc-dialog .tc-btn--green[disabled] { opacity: 1; }

/* ---------- Phones: smaller logos and tiles, so the names keep most of the width ---------- */
@media (max-width: 479.98px) {
  .trc-card { gap: 12px; min-height: 84px; padding: 12px 12px 12px 14px; }
  .tc-root .trc-logo, .tc-root .trc-card--cert .trc-logo { width: 48px; height: 48px; }
  .trc-card__btn { font-size: 1.0625rem; }
  .trc-card__open { width: 32px; height: 32px; font-size: 1rem; }
  .tc-root .trc-docs-card { padding: 20px 14px 22px; }
  .trc-doc { gap: 10px; padding: 7px 10px 7px 7px; font-size: 1rem; }
  .trc-doc__icon { width: 32px; height: 32px; border-radius: 10px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .trc-card:hover, .trc-card:focus-within, .trc-doc:hover { transform: none; }
}
