/* ============================================================
   Streamline Custom Marine Cookie Consent Banner + Preference
   Center. Brand tokens (from index.html :root):
     --navy:   #050e1f
     --deep:   #071428
     --mid:    #0a1e3d
     --blue:   #0d3b6e
     --teal:   #0e9aa7
     --cyan:   #22d3ee
     --gold:   #c9a84c
     --silver: #b0c4de
     --white:  #f0f6ff
     --text:   #ccd9ee
   Fonts: Rajdhani (display, headings/buttons), Inter (body).
   Falls back to literal values for any page that does not
   define the SCM CSS custom properties.
   ============================================================ */

/* ----- Banner shell ----- */
.scm-cc-banner,
.scm-cc-modal,
.scm-cc-pill {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #ccd9ee;
  box-sizing: border-box;
}
.scm-cc-banner *,
.scm-cc-banner *::before,
.scm-cc-banner *::after,
.scm-cc-modal *,
.scm-cc-modal *::before,
.scm-cc-modal *::after {
  box-sizing: border-box;
}

.scm-cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990; /* SCM nav is z-index 1000; this sits above it */
  background: #050e1f;
  border-top: 2px solid #0e9aa7;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55);
  padding: 18px 4%;
  display: none; /* JS toggles to flex */
}
.scm-cc-banner.scm-cc-visible { display: flex; }
.scm-cc-banner-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.scm-cc-copy {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #ccd9ee;
}
.scm-cc-copy strong {
  display: block;
  font-family: "Rajdhani", "Inter", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f0f6ff;
  margin-bottom: 4px;
}
.scm-cc-copy a {
  color: #22d3ee;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.scm-cc-copy a:hover,
.scm-cc-copy a:focus {
  color: #f0f6ff;
}
.scm-cc-gpc-notice {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(14, 154, 167, 0.10);
  border-left: 3px solid #0e9aa7;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  color: #ccd9ee;
}
.scm-cc-gpc-notice strong {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
  color: #f0f6ff;
  margin-bottom: 0;
}

/* ----- Buttons: equal visual weight (CPRA dark-pattern rule) ----- */
.scm-cc-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}
.scm-cc-btn {
  font-family: "Rajdhani", "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 11px 20px;
  min-width: 130px;
  border-radius: 3px;
  border: 1px solid #0e9aa7;
  background: linear-gradient(135deg, #0e9aa7, #22d3ee);
  color: #050e1f;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  display: inline-block;
}
.scm-cc-btn:hover,
.scm-cc-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 154, 167, 0.45);
  outline: none;
}
.scm-cc-btn:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
.scm-cc-btn:active { transform: translateY(0); }

/* Accept All and Reject All MUST look identical (CPRA dark-pattern rule). */
.scm-cc-btn-accept,
.scm-cc-btn-reject,
.scm-cc-btn-accept-analytics {
  background: linear-gradient(135deg, #0e9aa7, #22d3ee);
  border: 1px solid #0e9aa7;
  color: #050e1f;
}

/* Customize is secondary style, still meets 4.5:1 contrast. */
.scm-cc-btn-customize {
  background: transparent;
  border: 1px solid #b0c4de;
  color: #ccd9ee;
}
.scm-cc-btn-customize:hover,
.scm-cc-btn-customize:focus-visible {
  background: rgba(176, 196, 222, 0.08);
  border-color: #f0f6ff;
  color: #f0f6ff;
  transform: translateY(-2px);
}

/* ----- Modal (preference center) ----- */
.scm-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 14, 31, 0.78);
}
.scm-cc-modal.scm-cc-visible { display: flex; }
.scm-cc-modal-card {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  background: #071428;
  border: 1px solid rgba(14, 154, 167, 0.25);
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.65);
  padding: 28px 28px 24px;
  color: #ccd9ee;
  position: relative;
}
.scm-cc-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.scm-cc-modal-title {
  font-family: "Rajdhani", "Inter", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f0f6ff;
  margin: 0;
}
.scm-cc-modal-close {
  background: transparent;
  border: none;
  color: #b0c4de;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.scm-cc-modal-close:hover,
.scm-cc-modal-close:focus-visible {
  background: rgba(176, 196, 222, 0.08);
  color: #f0f6ff;
  outline: none;
}
.scm-cc-modal-close:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
.scm-cc-modal-intro {
  font-size: 0.92rem;
  color: #b0c4de;
  margin: 0 0 18px;
  line-height: 1.55;
}

/* ----- Category rows ----- */
.scm-cc-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px;
  border: 1px solid rgba(14, 154, 167, 0.22);
  border-radius: 6px;
  background: rgba(14, 154, 167, 0.04);
  margin-bottom: 10px;
}
.scm-cc-cat-body { flex: 1 1 auto; min-width: 0; }
.scm-cc-cat-name {
  font-family: "Rajdhani", "Inter", sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f0f6ff;
  margin: 0 0 4px;
}
.scm-cc-cat-desc {
  font-size: 0.85rem;
  color: #b0c4de;
  line-height: 1.5;
  margin: 0;
}
.scm-cc-cat-cookies {
  font-size: 0.78rem;
  color: #b0c4de;
  margin-top: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

/* ----- Toggle switch ----- */
.scm-cc-toggle {
  flex: 0 0 auto;
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-block;
  margin-top: 2px;
}
.scm-cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.scm-cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #0a1e3d;
  border: 1px solid rgba(176, 196, 222, 0.25);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.scm-cc-toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ccd9ee;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.scm-cc-toggle input:checked + .scm-cc-toggle-slider {
  background: #0e9aa7;
  border-color: #22d3ee;
}
.scm-cc-toggle input:checked + .scm-cc-toggle-slider::before {
  transform: translateX(20px);
  background: #f0f6ff;
}
.scm-cc-toggle input:focus-visible + .scm-cc-toggle-slider {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
.scm-cc-toggle input:disabled + .scm-cc-toggle-slider {
  opacity: 0.7;
  cursor: not-allowed;
}
.scm-cc-toggle input:disabled {
  cursor: not-allowed;
}
.scm-cc-cat-locked .scm-cc-cat-name::after {
  content: " (required)";
  font-family: "Inter", sans-serif;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #b0c4de;
  font-size: 0.78rem;
}

/* ----- Modal actions ----- */
.scm-cc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}

/* ----- GPC pill (reserved for future use) ----- */
.scm-cc-pill {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 99989;
  background: #050e1f;
  border: 1px solid #0e9aa7;
  border-radius: 50px;
  padding: 10px 18px;
  font-size: 0.86rem;
  color: #ccd9ee;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  display: none;
  max-width: calc(100% - 40px);
}
.scm-cc-pill.scm-cc-visible { display: inline-flex; align-items: center; gap: 8px; }
.scm-cc-pill-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  flex: 0 0 auto;
}

/* ----- Screen-reader only ----- */
.scm-cc-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ----- Footer "Cookie Settings" link ----- */
.scm-cc-footer-link {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  text-underline-offset: 2px;
}
.scm-cc-footer-link:hover,
.scm-cc-footer-link:focus-visible {
  color: #22d3ee;
  outline: none;
}

/* ----- Responsive: mobile stacking ----- */
@media (max-width: 760px) {
  .scm-cc-banner { padding: 14px 4% 16px; }
  .scm-cc-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .scm-cc-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .scm-cc-btn {
    width: 100%;
    min-width: 0;
    padding: 13px 18px;
  }
  .scm-cc-modal-card { padding: 22px 18px; }
  .scm-cc-modal-actions { justify-content: stretch; }
  .scm-cc-modal-actions .scm-cc-btn { flex: 1 1 140px; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .scm-cc-btn,
  .scm-cc-toggle-slider,
  .scm-cc-toggle-slider::before,
  .scm-cc-modal-close {
    transition: none;
  }
  .scm-cc-btn:hover,
  .scm-cc-btn:focus-visible {
    transform: none;
  }
}
