/* ===== Cookie Consent (lightweight) — FINAL CSS ===== */
.cc[hidden]{ display:none !important; }

.cc{
  position: fixed;
  inset: 0;
  z-index: 9999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.cc__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
}

/* Cards */
.cc__banner,
.cc__modal{
  position: absolute;
  left: 50%;
  width: min(920px, calc(100% - 24px));
  background: #fff;
  color: #0f172a;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  border: 1px solid rgba(15,23,42,.08);
}

/* Banner */
.cc__banner{
  bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 18px 18px 14px;
}


.cc__header{ margin-bottom: 6px; }
.cc__title{ font-size: 20px; margin: 0; }

.cc__text{
  margin: 0 0 12px;
  line-height: 1.45;
  font-size: 14px;
  color: rgba(15,23,42,.85);
}

.cc__link{
  color:#0284c7;
  text-decoration: none;
  white-space: nowrap;
}
.cc__link:hover{ text-decoration: underline; }

/* Buttons base */
.cc__btn{
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  cursor: pointer;
  min-width: 0;
  transition: transform .04s ease, background .12s ease, border-color .12s ease;
}
.cc__btn:active{ transform: translateY(1px); }

.cc__btn--ghost{ background: transparent; border-color: rgba(15,23,42,.14); }
.cc__btn--outline{ background: #fff; }

.cc__btn--primary{
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
.cc__btn--primary:hover{ background:#0276b3; border-color:#0276b3; }

/* ===== MOBILE layout (default): 1 wide + 2 below */
.cc__actions,
.cc__modalActions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "primary primary"
    "secondary tertiary";
  gap: 10px;
  width: 100%;
}

.cc__actions .cc__btn:nth-child(1),
.cc__modalActions .cc__btn:nth-child(1){ grid-area: primary; }

.cc__actions .cc__btn:nth-child(2),
.cc__modalActions .cc__btn:nth-child(2){ grid-area: secondary; }

.cc__actions .cc__btn:nth-child(3),
.cc__modalActions .cc__btn:nth-child(3){ grid-area: tertiary; }

.cc__actions .cc__btn:nth-child(1),
.cc__modalActions .cc__btn:nth-child(1){
  padding-top: 12px;
  padding-bottom: 12px;
  font-weight: 600;
}

/* ===== DESKTOP: all buttons in one row */
@media (min-width: 768px){
  .cc__actions,
  .cc__modalActions{
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
  }

  .cc__actions .cc__btn,
  .cc__modalActions .cc__btn{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .cc__actions .cc__btn:nth-child(1),
  .cc__modalActions .cc__btn:nth-child(1){
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* Modal */
.cc__modal{
  position: absolute;
  left: 50%;
  top: calc(15px + env(safe-area-inset-top));
  bottom: calc(15px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 16px;
  overflow: auto; /* щоб контент не вилазив */
}


.cc__modalHead{
  display:flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.cc__modalTitle{
  margin: 0;
  font-size: 16px;
}

.cc__iconBtn{
  border: 0;
  background: transparent;
  font-size: 26px;
  color: rgba(15,23,42,.65);
}

/* Accordion */
.cc__accordion{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 14px;
  max-height: min(56vh, 520px);
  overflow: auto;
  padding-right: 6px;
}

.cc__item{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  padding: 12px;
  background: rgba(2,132,199,.03);
}

.cc__itemRow{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cc__itemLeft{
  display:flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cc__itemTitle{ margin: 0; font-size: 15px; }

.cc__badge{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(15,23,42,.08);
  color: rgba(15,23,42,.75);
}

.cc__itemText{
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15,23,42,.80);
}

/* Switch */
.cc__switch{
  position: relative;
  display: inline-flex;
  align-items:center;
  cursor: pointer;
  user-select: none;
}
.cc__switch input{
  position:absolute;
  opacity:0;
  width:1px; height:1px;
}
.cc__slider{
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.16);
  background: rgba(15,23,42,.08);
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.cc__slider::after{
  content:"";
  position:absolute;
  top: 50%;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  transition: left .15s ease;
}
.cc__switch input:checked + .cc__slider{
  background: rgba(2,132,199,.35);
  border-color: rgba(2,132,199,.65);
}
.cc__switch input:checked + .cc__slider::after{ left: 22px; }
.cc__switch--disabled{ cursor:not-allowed; opacity:.7; }

/* Footer link */
.footer-cookie-link{
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
