/* Banner de cookies — estilo minimal (legal) */
.cookie-consent {
  position: fixed;
  inset: auto 0 0;
  z-index: 11000;
  padding: 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  pointer-events: none;
}

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

.cookie-consent__panel {
  pointer-events: auto;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.15rem 1.25rem;
  background: #ffffff;
  color: #1a2332;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 36, 0.14);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.55;
}

[data-theme="dark"] .cookie-consent__panel {
  background: #1a2332;
  color: #f0f2f5;
  border-color: rgba(255, 255, 255, 0.1);
}

.cookie-consent__title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.cookie-consent__text {
  margin: 0 0 0.85rem;
  color: #5a6578;
  font-size: 0.85rem;
}

[data-theme="dark"] .cookie-consent__text {
  color: #9aa8b8;
}

.cookie-consent__text a {
  color: #c45c26;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cookie-consent__btn--primary {
  background: #c45c26;
  color: #fff;
  border-color: #c45c26;
}

.cookie-consent__btn--primary:hover {
  background: #a34a1e;
}

.cookie-consent__btn--ghost {
  background: transparent;
  color: #1a2332;
  border-color: rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .cookie-consent__btn--ghost {
  color: #f0f2f5;
  border-color: rgba(255, 255, 255, 0.2);
}

.cookie-consent__btn--ghost:hover {
  border-color: #c45c26;
  color: #c45c26;
}

.cookie-consent__customize {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .cookie-consent__customize {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.cookie-consent__customize[hidden] {
  display: none !important;
}

.cookie-pref {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .cookie-pref {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.cookie-pref:last-of-type {
  border-bottom: none;
}

.cookie-pref__label {
  flex: 1;
  min-width: 0;
}

.cookie-pref__label strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.cookie-pref__label span {
  font-size: 0.78rem;
  color: #5a6578;
}

[data-theme="dark"] .cookie-pref__label span {
  color: #9aa8b8;
}

.cookie-pref input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: #c45c26;
  flex-shrink: 0;
}

.cookie-pref input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cookie-consent__customize-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

body.cookie-banner-open .fab-stack {
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

body.cookie-banner-open {
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 600px) {
  .cookie-consent {
    padding: 0.35rem 0.4rem;
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
  }

  .cookie-consent__panel {
    padding: 0.6rem 0.65rem;
    border-radius: 10px;
    max-height: min(38vh, 280px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cookie-consent__title {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    line-height: 1.25;
  }

  .cookie-consent__text {
    font-size: 0.68rem;
    line-height: 1.35;
    margin-bottom: 0.45rem;
  }

  .cookie-consent__actions,
  .cookie-consent__customize-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .cookie-consent__btn {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
    width: auto;
    min-height: 2rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.68rem;
    border-radius: 8px;
  }

  .cookie-consent__btn--primary {
    flex: 1 1 100%;
  }

  .cookie-consent__customize {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }

  .cookie-pref {
    padding: 0.35rem 0;
    gap: 0.45rem;
  }

  .cookie-pref__label strong {
    font-size: 0.72rem;
  }

  .cookie-pref__label span {
    font-size: 0.65rem;
    line-height: 1.3;
  }

  .cookie-pref input[type="checkbox"] {
    width: 0.95rem;
    height: 0.95rem;
  }

  body.cookie-banner-open .fab-stack {
    bottom: calc(2.75rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 900px) {
  body.cookie-banner-open .fab-stack {
    bottom: calc(2.5rem + env(safe-area-inset-bottom));
  }
}
