/* Epirtuk cookie consent — banner + settings modal */
.epc-banner {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 10050;
  width: min(380px, calc(100vw - 2rem));
  padding: 1.15rem 1.2rem 1.1rem;
  border-radius: 14px;
  background: #1e2430;
  color: #e8ecf1;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  font-family: inherit;
}

.epc-banner[hidden],
.epc-modal-root[hidden] {
  display: none !important;
}

.epc-banner__title {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.epc-banner__text {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #c5ccd6;
}

.epc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.epc-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.epc-btn:active {
  transform: scale(0.98);
}

.epc-btn--primary {
  background: #2a3344;
  color: #fff;
  border: 1px solid #3d475a;
}

.epc-btn--primary:hover {
  background: #343e52;
}

.epc-btn--ghost {
  background: transparent;
  color: #d0d6df;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.epc-btn--ghost:hover {
  color: #fff;
  text-decoration: underline;
}

.epc-btn--light {
  background: #eef1f5;
  color: #1e2430;
}

.epc-btn--light:hover {
  background: #e2e7ee;
}

.epc-btn--dark {
  background: #1e2430;
  color: #fff;
}

.epc-btn--dark:hover {
  background: #2a3344;
}

.epc-modal-root {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.epc-modal-root__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 30, 0.55);
  backdrop-filter: blur(2px);
}

.epc-modal {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1e2430;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.epc-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e8ecf1;
}

.epc-modal__head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1.25;
}

.epc-modal__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: #f1f4f8;
  color: #445;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
}

.epc-modal__close:hover {
  background: #e4e9f0;
}

.epc-modal__body {
  padding: 0.85rem 1.25rem 1rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.epc-modal__lead-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.epc-modal__lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #5a6575;
}

.epc-cat {
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  margin-bottom: 0.55rem;
  overflow: hidden;
  background: #fafbfc;
}

.epc-cat__row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.epc-cat__chev {
  flex-shrink: 0;
  width: 1rem;
  color: #889;
  transition: transform 0.2s ease;
}

.epc-cat.is-open .epc-cat__chev {
  transform: rotate(90deg);
}

.epc-cat__name {
  flex: 1;
  min-width: 0;
  font-weight: 650;
  font-size: 0.92rem;
}

.epc-switch {
  position: relative;
  flex-shrink: 0;
  width: 2.6rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #cfd6df;
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.epc-switch.is-on {
  background: #2eb8c9;
}

.epc-switch.is-locked {
  opacity: 0.85;
  cursor: not-allowed;
  background: #2a3344;
}

.epc-switch__knob {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 800;
  color: #889;
}

.epc-switch.is-on .epc-switch__knob,
.epc-switch.is-locked .epc-switch__knob {
  transform: translateX(1.15rem);
  color: #2a3344;
}

.epc-cat__desc {
  display: none;
  padding: 0 0.85rem 0.85rem 2.5rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #5a6575;
}

.epc-cat.is-open .epc-cat__desc {
  display: block;
}

.epc-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid #e8ecf1;
  background: #fff;
}

.epc-modal__foot .epc-btn {
  flex: 1 1 auto;
  min-width: fit-content;
}

@media (max-width: 520px) {
  .epc-banner {
    left: 0.65rem;
    right: 0.65rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom));
    width: auto;
  }

  .epc-modal__foot .epc-btn {
    flex: 1 1 100%;
  }
}

body.epc-lock {
  overflow: hidden;
}
