/* ─────────────────────────────────────────────────────────────────────────
   heic.dev — Cookie Consent Banner  (cookie-consent.css v2.2)
   Desktop : single row  — text + two buttons in one line
   Mobile  : two rows   — text on top, buttons below
   ───────────────────────────────────────────────────────────────────────── */

/* ── Banner container ──────────────────────────────────────────────────── */
#heic-cookie-banner {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 9999;
  width: max-content;
  max-width: calc(100% - 24px);

  background: var(--bg-card);
  border: 1px solid var(--border-med);
  border-radius: 100px;
  box-shadow: var(--shadow-lg);

  /* single row */
  padding: 5px 6px 5px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;

  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
}

#heic-cookie-banner.heic-cb--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Short text ─────────────────────────────────────────────────────────── */
.heic-cb__text {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.heic-cb__text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Action buttons ────────────────────────────────────────────────────── */
.heic-cb__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.heic-cb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 100px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.heic-cb__btn--accept {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.heic-cb__btn--accept:hover {
  filter: brightness(1.1);
}

.heic-cb__btn--necessary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-med);
}
.heic-cb__btn--necessary:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

/* ── Dark-mode ─────────────────────────────────────────────────────────── */
[data-theme="dark"] #heic-cookie-banner {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #heic-cookie-banner {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  }
}

/* ── Mobile — two rows: text on top, buttons below ────────────────────── */
@media (max-width: 480px) {
  #heic-cookie-banner {
    bottom: 10px;
    border-radius: 16px;        /* soften pill on two-row layout */
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: calc(100% - 24px);
    max-width: 360px;
  }

  .heic-cb__text {
    font-size: 11px;
    white-space: normal;
  }

  .heic-cb__actions {
    width: 100%;
    gap: 6px;
  }

  .heic-cb__btn {
    flex: 1;
    font-size: 11px;
    padding: 6px 10px;
  }
}
