/* Cookie consent banner — tapa. design system */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(860px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.10);
  padding: 18px;
  z-index: 9999;
  box-sizing: border-box;
  animation: cookie-banner-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cookie-banner-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-banner__copy {
  flex: 1;
  min-width: 0;
}

.cookie-banner__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #18181B;
  line-height: 1.3;
}

.cookie-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #71717A;
}

.cookie-banner__text a {
  color: #18181B;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__text a:hover {
  color: #27272A;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #E4E4E7;
  background: #FFFFFF;
  color: #18181B;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-btn:hover {
  background: #FAFAFA;
}

.cookie-btn:active {
  transform: scale(0.98);
}

.cookie-btn--primary {
  background: #18181B;
  border-color: #18181B;
  color: #FFFFFF;
}

.cookie-btn--primary:hover {
  background: #27272A;
  border-color: #27272A;
}

.cookie-btn--secondary {
  background: #FFFFFF;
  border-color: #E4E4E7;
  color: #18181B;
}

.cookie-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: #71717A;
}

.cookie-btn--ghost:hover {
  color: #18181B;
  background: #FAFAFA;
  border-color: #E4E4E7;
}

.cookie-btn--full {
  width: 100%;
}

.cookie-banner__settings {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #E4E4E7;
}

.cookie-banner__settings.hidden {
  display: none;
}

.cookie-setting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.cookie-setting + .cookie-setting {
  border-top: 1px solid #E4E4E7;
}

.cookie-setting__info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #18181B;
  margin-bottom: 2px;
}

.cookie-setting__info p {
  font-size: 12px;
  line-height: 1.5;
  color: #71717A;
  margin: 0;
}

.cookie-setting__toggle {
  flex-shrink: 0;
  position: relative;
  width: 40px;
  height: 24px;
}

.cookie-setting__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-setting__track {
  display: block;
  width: 40px;
  height: 24px;
  background: #E4E4E7;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-setting__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-setting__toggle input:checked + .cookie-setting__track {
  background: #18181B;
}

.cookie-setting__toggle input:checked + .cookie-setting__track::after {
  transform: translateX(16px);
}

.cookie-setting__toggle input:disabled + .cookie-setting__track {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .cookie-banner {
    bottom: 16px;
    padding: 16px;
  }

  .cookie-banner__content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__actions {
    flex-direction: column;
    width: 100%;
  }

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