/*
 * Client portal touchpoints on the public site.
 *
 * Kept out of style.css on purpose: that file is compiled (style.css.map sits
 * next to it), so hand-edits there are lost on the next SCSS build.
 */

.cs-portal_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  margin-right: 24px;
  border: 1px solid #FF4A17;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cs-portal_btn:hover,
.cs-portal_btn:focus {
  background: #FF4A17;
  border-color: #FF4A17;
  color: #fff;
  text-decoration: none;
}

.cs-portal_btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Tablet: the theme hides .cs-toolbox below 1200px, but the pill lives outside
   it so it stays visible. Tighten it up next to the mobile menu toggle. */
@media screen and (max-width: 1199px) {
  .cs-portal_btn {
    height: 38px;
    padding: 0 18px;
    margin-right: 20px;
    font-size: 13px;
  }
}

/* Phones: the label alone would crowd the logo and the menu toggle. */
@media screen and (max-width: 575px) {
  .cs-portal_btn {
    height: 34px;
    padding: 0 14px;
    margin-right: 14px;
    font-size: 11px;
    letter-spacing: 0.02em;
  }
}

/* ==========================================================================
   Consent dialog
   ========================================================================== */

.ctm-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  padding: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-transform: none;
}

.ctm-consent[hidden] { display: none; }

.ctm-consent-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 24px;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  background: rgba(16, 16, 16, 0.98);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.ctm-consent-title {
  margin: 0 0 8px 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.ctm-consent-intro {
  margin: 0 0 16px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #b4b4b4;
}

.ctm-consent-options { margin: 0 0 16px 0; display: grid; gap: 10px; }
.ctm-consent-options[hidden] { display: none; }

.ctm-consent-option {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  background: #161616;
  cursor: pointer;
}

.ctm-consent-option.is-locked { opacity: 0.75; cursor: default; }
.ctm-consent-option input { margin-top: 3px; accent-color: #FF4A17; width: 16px; height: 16px; }
.ctm-consent-option strong { display: block; font-size: 13.5px; color: #fff; }
.ctm-consent-option em { font-size: 11px; color: #7a7a7a; font-style: normal; }

.ctm-consent-purpose {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #999;
}

.ctm-consent-actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* Reject is deliberately the SAME weight as accept. A banner where refusing is
   harder than agreeing is not freely given consent. */
.ctm-consent-btn {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 11px 18px;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  background: #1c1c1c;
  color: #e8e8e8;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.ctm-consent-btn:hover { border-color: #5a5a5a; }
.ctm-consent-btn[hidden] { display: none; }
.ctm-consent-btn.is-primary { background: #FF4A17; border-color: #FF4A17; color: #fff; }
.ctm-consent-btn.is-primary:hover { background: #e5410f; border-color: #e5410f; }

.ctm-consent-legal {
  margin: 14px 0 0 0;
  font-size: 11.5px;
  color: #6f6f6f;
}

.ctm-consent-legal a { color: #FF4A17; }

@media (max-width: 575px) {
  .ctm-consent-card { padding: 18px; }
  .ctm-consent-btn { flex: 1 1 100%; }
}

/*
 * Both pills at once.
 *
 * The staff and client guards are independent, so one browser can hold both
 * sessions. When it does, the header shows "My Portal" and "Admin" side by
 * side rather than picking one. The second is muted so the pair does not read
 * as two competing primary actions, and the margin is tightened because two
 * pills at the full 24px gap crowd the menu toggle.
 */
.cs-portal_btn + .cs-portal_btn {
  margin-left: -12px;
}

.cs-portal_btn--secondary {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}

.cs-portal_btn--secondary:hover,
.cs-portal_btn--secondary:focus {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

@media screen and (max-width: 1199px) {
  .cs-portal_btn + .cs-portal_btn { margin-left: -8px; }
}

/* Below the mobile breakpoint two pills will not fit beside the burger, so the
   secondary one drops away. The destination is still reachable from inside
   whichever panel you are in. */
@media screen and (max-width: 575px) {
  .cs-portal_btn--secondary { display: none; }
}

/*
 * Legal pages (/terms, /privacy).
 *
 * The body is author-written HTML from the CMS editor, so it needs readable
 * defaults for headings and lists. style.css is compiled from SCSS, hence these
 * living here alongside the other portal touchpoints.
 */
.cs-legal_body {
  font-size: 16px;
  line-height: 1.8;
}

.cs-legal_body h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 40px 0 14px;
}

.cs-legal_body h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 30px 0 10px;
}

.cs-legal_body > *:first-child { margin-top: 0; }

.cs-legal_body p { margin: 0 0 16px; }

.cs-legal_body ul,
.cs-legal_body ol {
  margin: 0 0 16px 22px;
  padding: 0;
}

.cs-legal_body ul { list-style: disc; }
.cs-legal_body ol { list-style: decimal; }
.cs-legal_body li { margin-bottom: 8px; }

.cs-legal_body a {
  color: #FF4A17;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-legal_body blockquote {
  margin: 0 0 16px;
  padding-left: 18px;
  border-left: 3px solid rgba(255, 74, 23, 0.4);
  opacity: 0.85;
}

.cs-legal_body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 15px;
}

.cs-legal_body th,
.cs-legal_body td {
  border: 1px solid rgba(128, 128, 128, 0.28);
  padding: 10px 12px;
  text-align: left;
}

.cs-legal_meta {
  font-size: 14px;
  opacity: 0.7;
  margin: 0;
}

.cs-legal_sep { margin: 0 8px; opacity: 0.5; }
