/* ─── Shell ───────────────────────────────────────────────── */

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 300;
  padding: var(--space-sm);
  pointer-events: none;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent--managing {
  inset-block-start: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(29, 29, 31, 0.45);
  pointer-events: auto;
}

/* ─── Panel ───────────────────────────────────────────────── */

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__panel {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  pointer-events: auto;
  background: var(--cookie-surface, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  animation: cc_czgeyfzk_AGiCnIPUZh_cookie-consent-rise 240ms ease-out;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent--managing .cookie-consent__panel {
  max-width: 36rem;
  max-height: calc(100dvh - 2 * var(--space-sm));
  overflow-y: auto;
  padding: var(--space-md);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__panel:focus-visible {
  outline: 2px solid var(--cookie-accent, var(--color-accent));
  outline-offset: 2px;
}

@keyframes cc_czgeyfzk_AGiCnIPUZh_cookie-consent-rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent__panel {
    animation: none;
  }
}

/*
 * Mobile: the sticky add-to-cart bar owns the very bottom of the screen, so the
 * banner rides directly on top of it — welded to its upper edge, edge-to-edge,
 * rather than covering it. Both variables are set as inline styles on the root
 * element in index.tsx (measured, because CSS here cannot reach another
 * component); they are 0 / full safe area on every page without a bar.
 */
@media (max-width: 767px) {
  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) {
    inset-block-end: var(--buy-bar-h, 0);
    padding: 0;
  }

  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) .cookie-consent__panel {
    max-width: none;
    border-inline: 0;
    border-block-end: 0;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
    padding-block-end: calc(var(--space-sm) + var(--buy-bar-safe, 0));
    /* Lift only. The all-round shadow fell onto the bar underneath and read as
       a smudge between the two; the banner needs separation from the page above
       it, not from the bar it is welded to. */
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
  }
}

/*
 * Desktop banner: an edge-to-edge bar welded to the viewport bottom, with the
 * content itself capped at the site's 70rem measure. The padding formula does
 * the capping — no extra wrapper element, so the managing modal can reuse the
 * same panel markup.
 */
@media (min-width: 768px) {
  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) {
    padding: 0;
  }

  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) .cookie-consent__panel {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    max-width: none;
    border-radius: 0;
    border-inline: 0;
    border-block-end: 0;
    padding-block: var(--space-sm);
    /* Lines the bar's text up with `.ui-page__inner`'s content edge. */
    padding-inline: max(2rem, calc((100% - 70rem) / 2 + 2rem));
  }

  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) .cookie-consent__body {
    flex: 1;
  }

  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) .cookie-consent__title {
    font-size: 1rem;
    margin-block-end: 0.125rem;
  }
}

/* ─── Close (managing only) ───────────────────────────────── */

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__close {
  position: absolute;
  inset-block-start: var(--space-sm);
  inset-inline-end: var(--space-sm);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__close:hover {
  background: var(--color-surface-alt);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__close:focus-visible {
  outline: 2px solid var(--cookie-accent, var(--color-accent));
  outline-offset: 2px;
}

/* ─── Text ────────────────────────────────────────────────── */

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--color-text-primary);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent--managing .cookie-consent__title {
  padding-inline-end: 2.5rem;
  font-size: 1.25rem;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__desc {
  margin: 0;
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__link {
  color: var(--cookie-accent, var(--color-accent));
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__link:focus-visible {
  outline: 2px solid var(--cookie-accent, var(--color-accent));
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ─── Preferences ─────────────────────────────────────────── */

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-block-start: var(--space-md);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  background: var(--color-surface-alt);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__row-text {
  flex: 1;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__row-title {
  display: block;
  font-weight: 700;
  font-size: var(--text-small);
  color: var(--color-text-primary);
  cursor: pointer;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__row-desc {
  margin: 0.25rem 0 0;
  font-size: var(--text-label);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__locked {
  flex-shrink: 0;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-pill);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-size: var(--text-label);
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Switch ──────────────────────────────────────────────── */

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__switch {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 1.5rem;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__track {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: var(--color-text-muted);
  transition: background 160ms ease;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__track::after {
  content: "";
  position: absolute;
  inset-block-start: 0.1875rem;
  inset-inline-start: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--r-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__switch input:checked + .cookie-consent__track {
  background: var(--cookie-accent, var(--color-accent));
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__switch input:checked + .cookie-consent__track::after {
  transform: translateX(1.25rem);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__switch input:focus-visible + .cookie-consent__track {
  outline: 2px solid var(--cookie-accent, var(--color-accent));
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent__track, .cc_czgeyfzk_AGiCnIPUZh .cookie-consent__track::after {
    transition: none;
  }
}

/* ─── Actions ─────────────────────────────────────────────── */

/* Mobile card: the two decisions sit side by side. */
.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-block-start: var(--space-md);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__action {
  width: 100%;
}

/* "Tercihleri yönet" is an inline text button in the description, not a bottom
   row: keeps the action area to the two decisions and stays compact. */
.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__manage {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cookie-accent, var(--color-accent));
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__sep {
  margin-inline: 0.15em;
  color: var(--color-text-secondary);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__manage:hover {
  color: var(--color-text-primary);
}

.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__manage:focus-visible {
  outline: 2px solid var(--cookie-accent, var(--color-accent));
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Managing modal: no "manage" button, so a simple two-up row. */
.cc_czgeyfzk_AGiCnIPUZh .cookie-consent--managing .cookie-consent__actions {
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent--managing .cookie-consent__actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop bar: everything on one line, sized to content, no stretching. */
@media (min-width: 768px) {
  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) .cookie-consent__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: var(--space-sm);
    margin-block-start: 0;
  }

  .cc_czgeyfzk_AGiCnIPUZh .cookie-consent:not(.cookie-consent--managing) .cookie-consent__action {
    width: auto;
    white-space: nowrap;
  }
}

/* RTL: the switch knob starts at the right edge and travels left. */
.cc_czgeyfzk_AGiCnIPUZh .cookie-consent__switch input:checked + .cookie-consent__track:dir(rtl)::after, .cc_czgeyfzk_AGiCnIPUZh .cookie-consent__switch input:checked + .cookie-consent__track:lang(ar)::after { transform: translateX(-1.25rem); }
