@keyframes dpdpModalIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dpdpBannerUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Modal Dialog: Guaranteed dead-center on PC, Android, iOS, macOS, Linux */
dialog.dpdp-dialog,
.dpdp-dialog {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: auto !important;
  transform: none !important;
  width: min(450px, calc(100vw - 32px)) !important;
  max-width: 450px !important;
  height: fit-content !important;
  max-height: min(85vh, 600px) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  background: #0d1527 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 20px !important;
  padding: 26px !important;
  box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(99, 102, 241, 0.15) !important;
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  z-index: 999999 !important;
  animation: dpdpModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dpdp-dialog::backdrop {
  background: rgba(2, 6, 23, 0.8) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}

.dpdp-dialog h2 {
  margin: 0 0 8px !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  letter-spacing: -0.015em !important;
}

.dpdp-dialog p {
  margin: 0 0 12px !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: #94a3b8 !important;
}

.dpdp-dialog a,
.dpdp-notice a,
#dpdp-banner a {
  color: #60a5fa !important;
  text-decoration: underline;
  font-weight: 500;
  font-size: 13px;
  transition: color 0.15s ease;
}

.dpdp-dialog a:hover,
#dpdp-banner a:hover {
  color: #93c5fd !important;
}

.dpdp-check {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 14px 0 18px !important;
  padding: 12px 14px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #e2e8f0 !important;
  transition: all 0.15s ease !important;
}

.dpdp-check:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.dpdp-check input {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  margin: 2px 0 0 0 !important;
  accent-color: #3b82f6 !important;
  cursor: pointer !important;
}

.dpdp-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  margin-top: 20px !important;
}

.dpdp-dialog .dpdp-actions {
  justify-content: flex-end !important;
}

#dpdp-banner .dpdp-actions {
  justify-content: flex-start !important;
}

/* Button Styles */
.dpdp-btn-accept {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 9px 18px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
  transition: all 0.15s ease !important;
}

.dpdp-btn-accept:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.55) !important;
  transform: translateY(-1px) !important;
}

.dpdp-btn-reject {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  border-radius: 10px !important;
  padding: 9px 16px !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.dpdp-btn-reject:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #ffffff !important;
}

.dpdp-btn-manage {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  padding: 9px 16px !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.dpdp-btn-manage:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

.dpdp-dialog button,
#dpdp-banner button {
  font: inherit;
}

.dpdp-dialog button:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.dpdp-dialog button:focus-visible,
#dpdp-banner button:focus-visible,
.dpdp-dialog a:focus-visible {
  outline: 3px solid #62dcff;
  outline-offset: 3px;
}

/* Privacy Choices Banner (Floating Center Bottom) */
#dpdp-banner {
  position: fixed !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  right: auto !important;
  width: min(580px, calc(100vw - 32px)) !important;
  max-width: 580px !important;
  z-index: 50000 !important;
  padding: 20px 24px !important;
  background: #0d1527 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(99, 102, 241, 0.12) !important;
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  box-sizing: border-box !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  animation: dpdpBannerUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#dpdp-banner strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #f8fafc;
}

#dpdp-banner p {
  line-height: 1.5;
  margin: 0;
  color: #94a3b8;
  font-size: 13.5px;
}

.dpdp-notice {
  line-height: 1.75;
}

.dpdp-notice h2 {
  margin-top: 26px;
}

.dpdp-rights label {
  display: block;
  margin: 18px 0 8px;
}

.dpdp-rights select,
.dpdp-rights textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #52617e;
  background: #101727;
  color: #fff;
  font: inherit;
}

.dpdp-rights textarea {
  min-height: 140px;
}

.dpdp-footer {
  padding: 16px;
  text-align: center;
}

.dpdp-footer a,
.dpdp-footer button {
  margin: 8px;
  color: inherit;
}

/* Mobile Responsiveness for Android, iPhone, small screens */
@media (max-width: 640px) {
  #dpdp-banner {
    bottom: 12px !important;
    padding: 16px !important;
    border-radius: 16px !important;
    width: calc(100vw - 20px) !important;
  }
  dialog.dpdp-dialog,
  .dpdp-dialog {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 20px 18px !important;
    border-radius: 16px !important;
  }
  .dpdp-actions {
    flex-direction: column-reverse !important;
    width: 100% !important;
  }
  .dpdp-actions button {
    width: 100% !important;
    text-align: center !important;
  }
}
