/* Cookie consent — как у CrowdStore, цвета и кнопки SMMsphere */

.cs-cookie-banner,
.cs-cookie-modal {
  font-family: Lato, sans-serif;
}

.cs-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100030;
  pointer-events: none;
}

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

.cs-cookie-banner__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #e8e9f2;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(90, 80, 200, 0.14);
}

.cs-cookie-banner__text {
  margin: 0;
  flex: 1 1 420px;
  font-size: 14px;
  line-height: 1.55;
  color: #282c4b;
}

.cs-cookie-banner__text--short {
  display: none;
}

.cs-cookie-banner__text a,
.cs-cookie-modal a {
  color: #7874fe;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-cookie-banner__text a:hover,
.cs-cookie-modal a:hover {
  color: #5b56d6;
}

.cs-cookie-banner__actions,
.cs-cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.cs-cookie-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  min-height: 42px;
  font-family: Poppins, Lato, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.cs-cookie-btn--primary {
  background: linear-gradient(90deg, #b224ef 0%, #7579ff 100%);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(117, 121, 255, 0.7);
}

.cs-cookie-btn--primary:hover {
  opacity: 0.95;
}

.cs-cookie-btn--muted {
  background: #f3f4f8;
  color: #282c4b;
  border-color: #e8e9f2;
}

.cs-cookie-btn--muted:hover {
  color: #7874fe;
  background: #f7f6ff;
  border-color: #d8d7ff;
}

.cs-cookie-btn--outline {
  background: #fff;
  border-color: #e8e9f2;
  color: #282c4b;
}

.cs-cookie-btn--outline:hover {
  border-color: #7874fe;
  color: #7874fe;
  background: #f7f6ff;
}

.cs-cookie-btn--soft {
  background: #f7f6ff;
  color: #7874fe;
}

.cs-cookie-btn--soft:hover {
  background: #eeedff;
}

.cs-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cs-cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 44, 75, 0.45);
}

.cs-cookie-modal__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 60px rgba(90, 80, 200, 0.22);
}

.cs-cookie-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #9a9bb2;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.cs-cookie-modal__close:hover {
  background: #f7f6ff;
  color: #282c4b;
}

.cs-cookie-modal__title {
  margin: 0 0 12px;
  text-align: center;
  font-family: Poppins, Lato, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #282c4b;
}

.cs-cookie-modal__lead {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: #8181a5;
  text-align: center;
}

.cs-cookie-cat {
  border: 1px solid #e8e9f2;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  background: #f8f9fc;
}

.cs-cookie-cat__row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  margin: 0;
}

.cs-cookie-cat__check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #7874fe;
}

.cs-cookie-cat__check input:disabled {
  accent-color: #9a9bb2;
  cursor: not-allowed;
}

.cs-cookie-cat__name {
  display: block;
  font-family: Poppins, Lato, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #282c4b;
  margin-bottom: 4px;
}

.cs-cookie-cat__desc {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #8181a5;
}

.cs-cookie-modal__actions {
  margin-top: 18px;
  justify-content: center;
}

@media (max-width: 1024px) {
  body:has(.s2-tabbar) .cs-cookie-banner {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 860px) {
  .cs-cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 42vh;
  }

  body:has(.s2-tabbar) .cs-cookie-banner {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    max-height: calc(42vh - 8px);
  }

  .cs-cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
    max-height: inherit;
    overflow: auto;
  }

  .cs-cookie-banner__text {
    flex: 0 0 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
  }

  .cs-cookie-banner__text--long {
    display: none;
  }

  .cs-cookie-banner__text--short {
    display: block;
  }

  .cs-cookie-banner__actions {
    width: 100%;
    gap: 8px;
  }

  .cs-cookie-banner__actions .cs-cookie-btn {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .cs-cookie-banner__actions .cs-cookie-btn--outline {
    flex: 1 1 100%;
  }

  .cs-cookie-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .cs-cookie-modal__dialog {
    max-height: min(78vh, 640px);
    padding: 22px 16px 16px;
  }

  .cs-cookie-modal__actions {
    flex-direction: column;
  }

  .cs-cookie-modal__actions .cs-cookie-btn {
    width: 100%;
  }
}
