/* GDPR Consent Banner — aligned with ICPMN / Sandbox theme */

.nikba-consent-banner {
  --nikba-navy: #343f52;
  --nikba-primary: #3f78e0;
  --nikba-primary-hover: #3466c1;
  --nikba-gray-100: #fefefe;
  --nikba-gray-200: #f6f7f9;
  --nikba-gray-300: #cacaca;
  --nikba-gray-600: #60697b;
  --nikba-shadow: 0 1rem 3rem rgba(30, 34, 40, 0.12), 0 0.25rem 0.75rem rgba(30, 34, 40, 0.06);

  position: fixed;
  inset: auto 0 0 0;
  z-index: 99999;
  pointer-events: none;
  font-family: Manrope, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.nikba-consent-banner[hidden] {
  display: none !important;
}

.nikba-consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 34, 40, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: auto;
}

.nikba-consent-banner.is-visible .nikba-consent-backdrop {
  opacity: 1;
}

.nikba-consent-card {
  position: relative;
  max-width: 72rem;
  margin: 0 auto 1.25rem;
  padding: 0 1rem;
  transform: translateY(calc(100% + 1.5rem));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.nikba-consent-banner.is-visible .nikba-consent-card {
  transform: translateY(0);
}

.nikba-consent-shell {
  background: var(--nikba-gray-100);
  border: 1px solid rgba(202, 202, 202, 0.65);
  border-radius: 1rem;
  box-shadow: var(--nikba-shadow);
  overflow: hidden;
}

.nikba-consent-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem 1.5rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
}

.nikba-consent-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: var(--nikba-gray-200);
  color: var(--nikba-navy);
  flex-shrink: 0;
}

.nikba-consent-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.nikba-consent-content {
  min-width: 0;
}

.nikba-consent-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--nikba-navy);
}

.nikba-consent-text {
  margin: 0;
  color: var(--nikba-gray-600);
  font-size: 0.9rem;
}

.nikba-consent-links {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.nikba-consent-text a,
.nikba-consent-links a {
  color: var(--nikba-primary);
  text-decoration: none;
  font-weight: 600;
}

.nikba-consent-text a:hover,
.nikba-consent-links a:hover {
  text-decoration: underline;
}

.nikba-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.nikba-consent-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 50rem;
  padding: 0.62rem 1.35rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nikba-consent-btn:focus-visible {
  outline: 2px solid var(--nikba-primary);
  outline-offset: 2px;
}

.nikba-consent-btn--accept {
  background: var(--nikba-primary);
  color: #fff;
  box-shadow: 0 0.35rem 1rem rgba(63, 120, 224, 0.25);
}

.nikba-consent-btn--accept:hover {
  background: var(--nikba-primary-hover);
}

.nikba-consent-btn--reject {
  background: #fff;
  color: var(--nikba-navy);
  border-color: var(--nikba-gray-300);
}

.nikba-consent-btn--reject:hover {
  border-color: var(--nikba-navy);
  background: var(--nikba-gray-200);
}

.nikba-consent-btn--settings {
  background: transparent;
  color: var(--nikba-gray-600);
  border-color: transparent;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.nikba-consent-btn--settings:hover {
  color: var(--nikba-navy);
}

.nikba-consent-panel[hidden] {
  display: none !important;
}

.nikba-consent-panel {
  border-top: 1px solid rgba(202, 202, 202, 0.55);
  background: var(--nikba-gray-200);
  padding: 1rem 1.5rem 1.25rem;
}

.nikba-consent-panel-title {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nikba-gray-600);
}

.nikba-consent-categories {
  display: grid;
  gap: 0.65rem;
}

.nikba-consent-category {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid rgba(202, 202, 202, 0.55);
  border-radius: 0.75rem;
}

.nikba-consent-category-text {
  flex: 1;
  min-width: 0;
}

#nikba-consent-banner .nikba-consent-switch-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  min-width: 3rem;
  margin: 0;
  padding: 0;
}

#nikba-consent-banner .nikba-consent-switch-wrap .form-check-input {
  position: static !important;
  opacity: 1 !important;
  width: 2.75rem !important;
  height: 1.55rem !important;
  margin: 0 !important;
  float: none !important;
  cursor: pointer;
  flex-shrink: 0;
}

#nikba-consent-banner .nikba-consent-category.is-disabled .form-check-input {
  cursor: not-allowed;
  opacity: 0.65 !important;
}

.nikba-consent-category strong {
  display: block;
  font-weight: 700;
  color: var(--nikba-navy);
  margin-bottom: 0.1rem;
}

.nikba-consent-category span {
  display: block;
  color: var(--nikba-gray-600);
  font-size: 0.84rem;
}

.nikba-consent-save-row {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 991.98px) {
  .nikba-consent-main {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon content"
      "actions actions";
  }

  .nikba-consent-icon {
    grid-area: icon;
  }

  .nikba-consent-content {
    grid-area: content;
  }

  .nikba-consent-actions {
    grid-area: actions;
    justify-content: stretch;
  }

  .nikba-consent-btn--accept,
  .nikba-consent-btn--reject {
    flex: 1 1 calc(50% - 0.25rem);
    text-align: center;
  }

  .nikba-consent-btn--settings {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .nikba-consent-card {
    margin-bottom: 0.75rem;
    padding: 0 0.75rem;
  }

  .nikba-consent-main {
    padding: 1.15rem 1.1rem;
    gap: 1rem;
  }

  .nikba-consent-panel {
    padding: 0.85rem 1.1rem 1.1rem;
  }

  .nikba-consent-actions {
    flex-direction: column;
  }

  .nikba-consent-btn {
    width: 100%;
    text-align: center;
  }
}
