/* EU Consent Compliance - frontend styles */
.eucc-root {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 999999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.eucc-root[data-eucc-position="bottom"] {
  bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.eucc-root[data-eucc-position="top"] {
  top: 0;
  padding-top: env(safe-area-inset-top, 0px);
}

.eucc-banner {
  margin: 12px;
  background: rgba(17, 17, 17, 0.92);
  color: #fff;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.eucc-banner__content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.eucc-banner__text {
  flex: 1 1 auto;
  min-width: 0;
}

.eucc-banner__title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 16px;
}

.eucc-banner__message {
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.92;
}

.eucc-banner__policy {
  margin-top: 8px;
}

.eucc-link {
  color: #fff;
  text-decoration: underline;
}

.eucc-banner__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  min-width: 340px;
  align-items: stretch;
}

.eucc-btn {
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
  min-width: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}

.eucc-btn:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}

.eucc-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
}

.eucc-btn--primary,
.eucc-btn--secondary {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
}

.eucc-btn--ghost {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.35);
}

.eucc-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.eucc-modal.is-open {
  display: block;
}

.eucc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
}

.eucc-modal__panel {
  position: absolute;
  right: 16px;
  left: 16px;
  bottom: 16px;
  max-width: 720px;
  max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  background: #fff;
  color: #111;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

.eucc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(255,255,255,0));
}

.eucc-modal__title {
  font-weight: 700;
  font-size: 16px;
}

.eucc-modal__close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.eucc-modal__body {
  padding: 8px 16px;
  max-height: 52vh;
  overflow: auto;
}

.eucc-modal__footer {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eucc-modal .eucc-btn {
  border-color: #ddd;
  color: #111;
  background: #f6f6f6;
}

.eucc-modal .eucc-btn:hover {
  background: #efefef;
}

.eucc-modal .eucc-btn--primary,
.eucc-modal .eucc-btn--secondary {
  background: #f6f6f6;
  border-color: #ddd;
}

.eucc-cat {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.eucc-cat:last-child {
  border-bottom: none;
}

.eucc-cat__left {
  flex: 1;
  min-width: 0;
}

.eucc-cat__label {
  font-weight: 600;
  margin-bottom: 4px;
}

.eucc-cat__desc {
  font-size: 13px;
  opacity: .85;
  line-height: 1.35;
}

.eucc-cat__right {
  display: flex;
  align-items: center;
}

.eucc-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

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

.eucc-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ddd;
  border-radius: 999px;
  transition: .2s;
}

.eucc-toggle__slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 999px;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.eucc-toggle input:checked + .eucc-toggle__slider {
  background: #3b82f6;
}

.eucc-toggle input:checked + .eucc-toggle__slider:before {
  transform: translateX(20px);
}

.eucc-toggle input:disabled + .eucc-toggle__slider {
  opacity: .6;
  cursor: not-allowed;
}

.eucc-manage-fab {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 999998;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.92);
  color: #111;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
}

.eucc-manage-link {
  border: none;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.eucc-media-placeholder {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 16px;
  border-radius: 12px;
  margin: 12px 0;
}

.eucc-media-placeholder__msg {
  margin-bottom: 10px;
  font-size: 14px;
}

.eucc-media-placeholder__btn {
  min-width: auto;
}

@media (max-width: 920px) {
  .eucc-banner__actions {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    min-width: 280px;
  }
}

@media (max-width: 640px) {
  .eucc-root[data-eucc-position="bottom"] {
    bottom: 0;
  }

  .eucc-banner {
    margin: 8px;
    padding: 14px;
    border-radius: 14px;
  }

  .eucc-banner__content {
    flex-direction: column;
    align-items: stretch;
  }

  .eucc-banner__actions,
  .eucc-modal__footer {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }

  .eucc-banner__actions,
  .eucc-modal__footer {
    display: grid;
  }

  .eucc-btn {
    width: 100%;
  }

  .eucc-modal__panel {
    top: 8px;
    bottom: 8px;
    left: 8px;
    right: 8px;
    max-height: none;
    display: flex;
    flex-direction: column;
  }

  .eucc-modal__body {
    max-height: none;
    flex: 1 1 auto;
  }

  .eucc-cat {
    flex-direction: column;
    gap: 10px;
  }

  .eucc-cat__right {
    justify-content: flex-start;
  }

  .eucc-manage-fab {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}
