/* DictamenPro — Cookie Banner and Preference Styles */
.dp-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 480px;
  width: calc(100vw - 48px);
  background: var(--ink);
  color: #f5f4ee;
  border: 1px solid #2a4c58;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 16px 36px rgba(10, 37, 39, 0.4);
  z-index: 1000;
  display: none;
  animation: dpBannerIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dp-cookie-banner.is-visible {
  display: block;
}

@keyframes dpBannerIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dp-cookie-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dp-cookie-head .icon {
  width: 20px;
  height: 20px;
  stroke: var(--mint);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.dp-cookie-head h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
  color: #ffffff;
}

.dp-cookie-body p {
  font-size: 13px;
  line-height: 1.6;
  color: #b0c2be;
  margin: 0 0 16px;
}

.dp-cookie-body a {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dp-cookie-body a:hover {
  color: #ffffff;
}

.dp-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dp-cookie-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
}

.dp-cookie-btn-primary {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--mint);
  font-weight: 600;
}

.dp-cookie-btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.dp-cookie-btn-secondary {
  background: transparent;
  color: #f5f4ee;
  border-color: #416069;
}

.dp-cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #789588;
}

.dp-cookie-btn-link {
  background: transparent;
  color: #b0c2be;
  border: 0;
  padding: 10px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dp-cookie-btn-link:hover {
  color: #ffffff;
}

/* Modal de preferencias */
.dp-cookie-dialog {
  border: 1px solid #d6dcd5;
  padding: 32px;
  background: #ffffff;
  color: var(--ink);
  width: min(600px, 94vw);
  max-height: 88vh;
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(20, 46, 57, 0.25);
}

.dp-cookie-dialog::backdrop {
  background: rgba(6, 30, 40, 0.7);
  backdrop-filter: blur(4px);
}

.dp-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.dp-dialog-head h2 {
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 600;
}

.dp-dialog-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.dp-dialog-close {
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.dp-dialog-close:hover {
  color: var(--ink);
}

.dp-cookie-item {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fafaf8;
}

.dp-cookie-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dp-cookie-item-header strong {
  font-size: 14px;
  font-weight: 600;
}

.dp-cookie-badge {
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  background: #e3ebe6;
  color: var(--teal);
  border: 1px solid #cad6d0;
  border-radius: 2px;
  font-weight: 600;
}

.dp-cookie-item p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 0;
}

/* Accessible Switch toggle */
.dp-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.dp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dp-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5d1;
  border-radius: 24px;
  transition: background-color 0.25s;
}

.dp-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.dp-switch input:checked + .dp-slider {
  background-color: var(--teal);
}

.dp-switch input:focus-visible + .dp-slider {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.dp-switch input:checked + .dp-slider:before {
  transform: translateX(20px);
}

.dp-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}

/* Trigger button in footer */
.cookie-settings-trigger {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-settings-trigger:hover {
  color: var(--teal);
}

@media (max-width: 600px) {
  .dp-cookie-banner {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    padding: 18px;
  }
  .dp-cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .dp-cookie-btn,
  .dp-cookie-btn-link {
    width: 100%;
    text-align: center;
  }
  .dp-dialog-actions {
    flex-direction: column;
  }
  .dp-dialog-actions .dp-cookie-btn {
    width: 100%;
  }
}
