/* Cookie banner + settings — Elam-style, black/white pills. */

.kcc {
  position: fixed;
  inset: auto 16px 20px;
  z-index: 12000;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.kcc[hidden] {
  display: none;
}

.kcc-banner,
.kcc-modal {
  pointer-events: auto;
  background: #fff;
  color: #1d1d1f;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 17, 20, 0.18), 0 2px 8px rgba(15, 17, 20, 0.08);
}

.kcc-banner {
  position: relative;
  width: min(560px, 100%);
  padding: 22px 28px 22px;
}

.kcc-x {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #8e8e93;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.kcc-x:hover {
  color: #1d1d1f;
}

.kcc-banner-title {
  font-family: var(--sans, system-ui);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0 28px 8px 0;
  line-height: 1.3;
}

[dir="rtl"] .kcc-banner-title {
  font-family: var(--farsi, system-ui);
  margin: 0 0 8px 28px;
}

.kcc-banner-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: #3c3c43;
  margin: 0 0 16px;
}

[dir="rtl"] .kcc-banner-body {
  font-family: var(--farsi, system-ui);
}

.kcc-banner-body a {
  color: inherit;
  text-underline-offset: 2px;
}

.kcc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kcc-btn {
  appearance: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

[dir="rtl"] .kcc-btn {
  font-family: var(--farsi, system-ui);
}

.kcc-btn-primary {
  background: #1d1d1f;
  color: #fff;
  border: 1px solid #1d1d1f;
}

.kcc-btn-primary:hover {
  background: #000;
}

.kcc-btn-ghost {
  background: #fff;
  color: #1d1d1f;
  border: 1px solid #1d1d1f;
}

.kcc-btn-ghost:hover {
  background: #f5f5f7;
}

.kcc-overlay {
  position: fixed;
  inset: 0;
  z-index: 12010;
  background: rgba(15, 17, 20, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  pointer-events: auto;
}

.kcc-overlay[hidden] {
  display: none;
}

.kcc-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  padding: 28px 28px 22px;
}

.kcc-modal-title {
  font-family: var(--serif, Georgia, serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.5px;
  margin: 0 32px 22px 0;
  line-height: 1.2;
}

[dir="rtl"] .kcc-modal-title {
  font-family: var(--farsi-display, var(--farsi, system-ui));
  font-weight: 400;
  margin: 0 0 22px 32px;
}

.kcc-cats {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kcc-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid #ececee;
}

.kcc-cat:first-child {
  border-top: 0;
  padding-top: 0;
}

.kcc-cat-copy h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 6px;
}

.kcc-cat-copy p {
  font-size: 13px;
  line-height: 1.5;
  color: #5c5c62;
  margin: 0;
}

[dir="rtl"] .kcc-cat-copy h3,
[dir="rtl"] .kcc-cat-copy p {
  font-family: var(--farsi, system-ui);
}

.kcc-switch {
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #d8d8dc;
  position: relative;
  cursor: pointer;
  padding: 0;
  margin-top: 2px;
}

.kcc-switch.is-on {
  background: #1d1d1f;
}

.kcc-switch.is-locked {
  background: #c7c7cc;
  cursor: not-allowed;
}

.kcc-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease;
}

.kcc-switch.is-on .kcc-knob {
  transform: translateX(18px);
  color: #1d1d1f;
}

.kcc-switch.is-locked .kcc-knob {
  color: #8e8e93;
}

[dir="rtl"] .kcc-switch.is-on .kcc-knob {
  transform: translateX(-18px);
}

.kcc-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 540px) {
  .kcc {
    inset: auto 10px 12px;
  }
  .kcc-banner,
  .kcc-modal {
    padding: 20px 18px 18px;
  }
  .kcc-actions {
    flex-direction: column;
  }
  .kcc-btn {
    width: 100%;
    text-align: center;
  }
}
