/* CP Staffing — Privacy consent banner & preferences (first-party) */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.privacy-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  padding: 16px;
  pointer-events: none;
}

.privacy-consent-banner[hidden] {
  display: none !important;
}

.privacy-consent-banner__panel {
  pointer-events: auto;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 22px;
  background: #060b18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  color: #f3f6fc;
  font-family: Inter, system-ui, Arial, sans-serif;
}

.privacy-consent-banner__title {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f3f6fc;
}

.privacy-consent-banner__body {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #a9b4c9;
}

.privacy-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.privacy-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.privacy-consent-btn:focus {
  outline: none;
}

.privacy-consent-btn:focus-visible {
  outline: 3px solid rgba(106, 168, 255, 0.55);
  outline-offset: 2px;
}

.privacy-consent-btn--primary {
  background: #3b6fd6;
  color: #fff;
  border-color: #3b6fd6;
}

.privacy-consent-btn--primary:hover {
  background: #5080de;
}

.privacy-consent-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #f3f6fc;
  border-color: rgba(255, 255, 255, 0.18);
}

.privacy-consent-btn--secondary:hover {
  border-color: rgba(106, 168, 255, 0.45);
  background: rgba(255, 255, 255, 0.09);
}

.privacy-consent-btn--tertiary {
  background: transparent;
  color: #6aa8ff;
  border-color: rgba(106, 168, 255, 0.35);
}

.privacy-consent-btn--tertiary:hover {
  background: rgba(58, 111, 214, 0.12);
}

.privacy-consent-banner__legal {
  margin-top: 12px;
  font-size: 0.8125rem;
}

.privacy-consent-banner__legal a {
  color: #6aa8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-consent-banner__legal a:focus-visible {
  outline: 2px solid rgba(106, 168, 255, 0.55);
  outline-offset: 2px;
}

/* Preferences modal */
.privacy-consent-modal[hidden] {
  display: none !important;
}

.privacy-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.privacy-consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 9, 0.72);
}

.privacy-consent-modal__dialog {
  position: relative;
  width: min(100%, 560px);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 24px;
  background: #060b18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  color: #f3f6fc;
  font-family: Inter, system-ui, Arial, sans-serif;
}

.privacy-consent-modal__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
}

.privacy-consent-modal__intro {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #a9b4c9;
}

.privacy-consent-category {
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.privacy-consent-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.privacy-consent-category__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.privacy-consent-category__badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6aa8ff;
  white-space: nowrap;
}

.privacy-consent-category__desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #a9b4c9;
}

.privacy-consent-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  padding: 0;
}

.privacy-consent-toggle:focus {
  outline: none;
}

.privacy-consent-toggle:focus-visible {
  outline: 3px solid rgba(106, 168, 255, 0.55);
  outline-offset: 2px;
}

.privacy-consent-toggle[aria-checked="true"] {
  background: #3b6fd6;
}

.privacy-consent-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.privacy-consent-toggle[aria-checked="true"] .privacy-consent-toggle__knob {
  transform: translateX(20px);
}

.privacy-consent-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.footer-privacy-choices {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  line-height: 1.6;
}

.footer-privacy-choices:hover {
  color: #f3f6fc;
}

.footer-privacy-choices:focus {
  outline: none;
}

.footer-privacy-choices:focus-visible {
  outline: 2px solid rgba(106, 168, 255, 0.55);
  outline-offset: 2px;
}

.site-footer .footer-privacy-choices,
.site-footer .footer-col .footer-privacy-choices {
  color: var(--muted, #a9b4c9);
  font-size: 14px;
}

@media (max-width: 480px) {
  .privacy-consent-banner__panel {
    padding: 16px;
  }

  .privacy-consent-banner__actions,
  .privacy-consent-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .privacy-consent-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .privacy-consent-btn,
  .privacy-consent-toggle__knob {
    transition: none;
  }
}
