/* Blueprint Web Mods — Cookie Consent banner, modal, and trigger */

.blueprint-cookie-banner,
.blueprint-cookie-modal {
  display: none;
}

.blueprint-cookie-banner:not([hidden]) {
  display: block;
}

.blueprint-cookie-modal:not([hidden]) {
  display: block;
}

/* ── Banner ─────────────────────────────────────────────────────── */

.blueprint-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  background: #1f2937;
  color: #f9fafb;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}

.blueprint-cookie-banner__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.blueprint-cookie-banner__text {
  margin: 0;
  flex: 1 1 320px;
  font-size: 14px;
  line-height: 1.5;
}

.blueprint-cookie-banner__link {
  color: #93c5fd;
  text-decoration: underline;
  white-space: nowrap;
}

.blueprint-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

/* ── Buttons ────────────────────────────────────────────────────── */

.blueprint-cookie-btn {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.blueprint-cookie-btn--accept {
  background: #2563eb;
  color: #fff;
}

.blueprint-cookie-btn--accept:hover {
  background: #1d4ed8;
}

.blueprint-cookie-btn--reject {
  background: transparent;
  color: #f9fafb;
  border-color: #6b7280;
}

.blueprint-cookie-btn--reject:hover {
  background: rgba(255, 255, 255, 0.08);
}

.blueprint-cookie-btn--manage {
  background: transparent;
  color: #93c5fd;
  border-color: transparent;
  text-decoration: underline;
  padding-left: 4px;
  padding-right: 4px;
}

/* ── Modal ──────────────────────────────────────────────────────── */

.blueprint-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
}

.blueprint-cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.6);
}

.blueprint-cookie-modal__box {
  position: relative;
  max-width: 480px;
  width: calc(100% - 32px);
  margin: 8vh auto;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 28px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.blueprint-cookie-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.blueprint-cookie-modal__close:hover {
  color: #111827;
}

.blueprint-cookie-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
}

.blueprint-cookie-modal__intro {
  margin: 0 0 20px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

.blueprint-cookie-modal__categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.blueprint-cookie-modal__category {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 16px;
}

.blueprint-cookie-modal__category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blueprint-cookie-modal__category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.blueprint-cookie-modal__category-name {
  font-weight: 600;
  font-size: 15px;
}

.blueprint-cookie-modal__always-on {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.blueprint-cookie-modal__category-desc {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.blueprint-cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blueprint-cookie-modal__footer .blueprint-cookie-btn {
  flex: 1 1 auto;
  text-align: center;
}

.blueprint-cookie-modal__footer .blueprint-cookie-btn--manage {
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  border-color: #d1d5db;
}

/* ── Toggle switch ──────────────────────────────────────────────── */

.blueprint-cookie-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.blueprint-cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.blueprint-cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.blueprint-cookie-toggle__slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.blueprint-cookie-toggle input:checked + .blueprint-cookie-toggle__slider {
  background: #2563eb;
}

.blueprint-cookie-toggle
  input:checked
  + .blueprint-cookie-toggle__slider::before {
  transform: translateX(18px);
}

/* ── Floating trigger ───────────────────────────────────────────── */

.blueprint-cookie-trigger {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 999998;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1f2937;
  color: #f9fafb;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.blueprint-cookie-trigger:not([hidden]) {
  display: flex;
}

.blueprint-cookie-trigger:hover {
  background: #111827;
}

@media (max-width: 600px) {
  .blueprint-cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .blueprint-cookie-banner__text {
    flex: 1;
  }

  .blueprint-cookie-banner__actions {
    justify-content: stretch;
  }

  .blueprint-cookie-banner__actions .blueprint-cookie-btn {
    flex: 1 1 auto;
  }
}
