.st-cookie-consent {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 280;
  transform: none;
  width: min(380px, calc(100% - 1.5rem));
  pointer-events: none;
  font-family: "Graphik LCG", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.st-cookie-card {
  pointer-events: auto;
  background: #ffffff;
  color: #11243e;
  border: 1px solid rgba(17, 36, 62, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(17, 36, 62, 0.1);
  padding: 0.75rem 0.8rem;
  animation: st-cookie-enter 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.st-cookie-card__title {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.2;
  font-weight: 600;
}

.st-cookie-card__desc {
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(17, 36, 62, 0.72);
}

.st-cookie-card__desc a {
  color: #3478f6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.st-cookie-card__actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.st-cookie-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 9px;
  min-height: 34px;
  padding: 0.45rem 0.68rem;
  font-size: 0.75rem;
  line-height: 1.1;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.st-cookie-btn--primary {
  background: #3478f6;
  border-color: #3478f6;
  color: #fff;
}

.st-cookie-btn--primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.st-cookie-btn--ghost {
  background: #ffffff;
  border-color: rgba(17, 36, 62, 0.18);
  color: #11243e;
}

.st-cookie-btn--ghost:hover {
  background: rgba(17, 36, 62, 0.05);
}

.st-cookie-btn--soft {
  background: rgba(52, 120, 246, 0.08);
  border-color: rgba(52, 120, 246, 0.28);
  color: #2563eb;
}

.st-cookie-btn--soft:hover {
  background: rgba(52, 120, 246, 0.14);
}

.st-cookie-settings {
  position: fixed;
  inset: 0;
  z-index: 290;
  pointer-events: auto;
}

.st-cookie-settings__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 26, 0.52);
}

.st-cookie-settings__panel {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  transform: none;
  width: min(390px, calc(100% - 1.5rem));
  background: #ffffff;
  color: #11243e;
  border: 1px solid rgba(17, 36, 62, 0.14);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(12, 22, 37, 0.24);
  padding: 0.95rem;
}

.st-cookie-settings__title {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.25;
  font-weight: 600;
}

.st-cookie-settings__desc {
  margin: 0.55rem 0 0;
  color: rgba(17, 36, 62, 0.72);
  font-size: 0.875rem;
  line-height: 1.45;
}

.st-cookie-settings__groups {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.st-cookie-item {
  border: 1px solid rgba(17, 36, 62, 0.12);
  background: #f8fbff;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.st-cookie-item strong {
  display: block;
  font-size: 0.875rem;
  line-height: 1.25;
}

.st-cookie-item small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(17, 36, 62, 0.68);
}

.st-cookie-item input[type='checkbox'] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #3478f6;
}

.st-cookie-settings__actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.st-cookie-settings__actions .st-cookie-btn--ghost {
  color: #11243e;
  border-color: rgba(17, 36, 62, 0.22);
}

.st-cookie-settings__actions .st-cookie-btn--ghost:hover {
  background: rgba(17, 36, 62, 0.06);
}

body.st-cookie-settings-open {
  overflow: hidden;
}

/* Desktop: mobile-only elements are inert */
.st-cookie-card__mobile-strip,
.st-cookie-card__mobile-collapse {
  display: none;
}

.st-cookie-card__body {
  display: contents;
}

@media (max-width: 768px) {
  .st-cookie-consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
  }

  .st-cookie-card {
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 -4px 24px rgba(17, 36, 62, 0.1);
    overflow: hidden;
  }

  .st-cookie-card__body {
    display: none;
    padding: 0.55rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }

  .st-cookie-consent--expanded .st-cookie-card__body {
    display: block;
  }

  .st-cookie-consent--expanded .st-cookie-card__mobile-strip {
    display: none;
  }

  .st-cookie-card__mobile-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.4rem 0.65rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }

  .st-cookie-card__mobile-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    color: #11243e;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0.2rem 0.15rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 0;
  }

  .st-cookie-card__mobile-icon {
    flex-shrink: 0;
    color: #3478f6;
  }

  .st-cookie-card__mobile-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .st-cookie-card__mobile-chevron {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 1.5px solid rgba(17, 36, 62, 0.45);
    border-bottom: 1.5px solid rgba(17, 36, 62, 0.45);
    transform: rotate(45deg);
    margin-top: -0.15rem;
    flex-shrink: 0;
  }

  .st-cookie-card__mobile-chevron--up {
    transform: rotate(-135deg);
    margin-top: 0.1rem;
  }

  .st-cookie-card__mobile-quick {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .st-cookie-btn--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0.3rem;
    background: rgba(52, 120, 246, 0.08);
    border-color: rgba(52, 120, 246, 0.28);
    color: #2563eb;
    border-radius: 8px;
  }

  .st-cookie-btn--compact {
    min-height: 32px;
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .st-cookie-card__mobile-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    min-height: 20px;
    padding: 0.15rem 0 0.35rem;
    cursor: pointer;
  }

  .st-cookie-card__title {
    font-size: 0.875rem;
    line-height: 1.2;
  }

  .st-cookie-card__desc {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .st-cookie-card__actions {
    margin-top: 0.55rem;
    gap: 0.4rem;
  }

  .st-cookie-card__actions .st-cookie-btn {
    flex: 1 1 calc(50% - 0.2rem);
    min-height: 36px;
    font-size: 0.75rem;
  }

  .st-cookie-settings__panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    padding: 0.85rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

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

@media (prefers-reduced-motion: reduce) {
  .st-cookie-card {
    animation: none;
  }
}

@keyframes st-cookie-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
