.gsm-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.gsm-cookie-banner:not([hidden]):not(.gsm-cookie-banner--dismissed) {
  animation: gsm-cookie-slide-up 0.35s ease;
}

.gsm-cookie-banner[hidden],
.gsm-cookie-banner.gsm-cookie-banner--dismissed {
  display: none !important;
}

.gsm-cookie-banner__panel {
  pointer-events: auto;
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e6edf7;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(11, 23, 54, 0.12);
  overflow: hidden;
}

.gsm-cookie-banner__main,
.gsm-cookie-banner__preferences {
  padding: 18px 20px;
}

.gsm-cookie-banner__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.gsm-cookie-banner__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #0b1736;
}

.gsm-cookie-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #34405a;
}

.gsm-cookie-banner__text a {
  color: #1567d8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gsm-cookie-banner__actions,
.gsm-cookie-banner__pref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.gsm-cookie-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gsm-cookie-btn--primary {
  background: #1567d8;
  color: #fff;
}

.gsm-cookie-btn--primary:hover {
  background: #0a377c;
}

.gsm-cookie-btn--outline {
  background: #fff;
  border-color: #c9d8ef;
  color: #0a377c;
}

.gsm-cookie-btn--outline:hover {
  background: #eaf3ff;
}

.gsm-cookie-btn--ghost {
  background: transparent;
  border-color: #d8e2f0;
  color: #34405a;
}

.gsm-cookie-btn--ghost:hover {
  background: #f6f9fe;
}

.gsm-cookie-banner__preferences {
  border-top: 1px solid #e6edf7;
}

.gsm-cookie-pref + .gsm-cookie-pref {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef3fa;
}

.gsm-cookie-pref__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.gsm-cookie-pref__head strong {
  display: block;
  margin-bottom: 4px;
  color: #0b1736;
  font-size: 14px;
}

.gsm-cookie-pref__head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #69758f;
}

.gsm-cookie-pref__badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #0a377c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gsm-cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
}

.gsm-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gsm-cookie-switch span {
  position: absolute;
  inset: 0;
  background: #d8e2f0;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.gsm-cookie-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.gsm-cookie-switch input:checked + span {
  background: #1567d8;
}

.gsm-cookie-switch input:checked + span::after {
  transform: translateX(20px);
}

.gsm-cookie-switch input:focus-visible + span {
  outline: 2px solid #1567d8;
  outline-offset: 2px;
}

@keyframes gsm-cookie-slide-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .gsm-cookie-banner__main {
    grid-template-columns: 1fr;
  }

  .gsm-cookie-banner__actions,
  .gsm-cookie-banner__pref-actions {
    justify-content: stretch;
  }

  .gsm-cookie-btn {
    flex: 1 1 calc(50% - 5px);
    text-align: center;
  }
}

@media (max-width: 520px) {
  .gsm-cookie-banner__panel {
    border-radius: 16px 16px 0 0;
  }

  .gsm-cookie-btn {
    flex: 1 1 100%;
  }
}
