/* Cookie consent styles */

.ds-cc {
  position: fixed;
  left: 24px;
  bottom: 24px;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--ds-line, #e3e6ee);
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16);
  padding: 24px;
  z-index: 10000;
  font-family: var(--font-body, "Urbanist", sans-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ds-text, #4a5263);
}

.ds-cc p {
  margin: 0 0 16px 0;
}

.ds-cc a {
  color: var(--color-primary, #119fdd);
  text-decoration: underline;
}

.ds-cc a:hover {
  color: var(--color-primary, #119fdd);
}

.ds-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ds-cc-btn {
  height: 40px;
  padding: 0 16px;
  font-family: var(--font-display, "Aeonik", sans-serif);
  font-size: 14px;
  border: 1.5px solid var(--color-primary, #119fdd);
  border-radius: 0;
  cursor: pointer;
  background: #fff;
  color: var(--ds-ink, #141a26);
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

.ds-cc-btn:hover {
  background: var(--ds-surface, #f5f7fb);
}

.ds-cc-btn:focus-visible {
  outline: 2px solid var(--color-primary, #119fdd);
  outline-offset: 2px;
}

.ds-cc-btn--primary {
  background: var(--color-primary, #119fdd);
  color: #fff;
}

.ds-cc-btn--primary:hover {
  background: var(--color-primary, #119fdd);
  filter: brightness(0.9);
}

@media (max-width: 479px) {
  .ds-cc {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .ds-cc-actions {
    gap: 8px;
  }

  .ds-cc-btn {
    flex: 1 1 100%;
  }
}

/* Modal */
.ds-cc-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 34, 0.55);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ds-cc-modal[hidden] {
  display: none;
}

.ds-cc-panel {
  background: #fff;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 32px;
  border: 1px solid var(--ds-line, #e3e6ee);
  position: relative;
}

.ds-cc-modal h2 {
  font-size: 22px;
  font-family: var(--font-display, "Aeonik", sans-serif);
  font-weight: 500;
  color: var(--ds-ink, #141a26);
  margin: 0 0 8px 0;
  padding-right: 36px;
}

.ds-cc-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ds-text, #4a5263);
  margin: 0 0 24px 0;
}

.ds-cc-categories {
  margin: 0 0 32px 0;
  border-top: 1px solid var(--ds-line, #e3e6ee);
}

.ds-cc-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ds-line, #e3e6ee);
}

.ds-cc-row:last-child {
  border-bottom: none;
}

.ds-cc-row-content {
  flex: 1;
}

.ds-cc-row-title {
  font-size: 16px;
  font-family: var(--font-display, "Aeonik", sans-serif);
  font-weight: 500;
  color: var(--ds-ink, #141a26);
  margin-bottom: 4px;
}

.ds-cc-row-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ds-text, #4a5263);
}

.ds-cc-toggle {
  display: inline-block;
  cursor: pointer;
  flex-shrink: 0;
}

.ds-cc-toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  min-width: 40px;
  max-width: none;
  height: 22px !important;
  flex: none;
  background: var(--ds-line, #e3e6ee);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: background-color 150ms ease-out;
  margin: 0;
  padding: 0;
}

.ds-cc-toggle input:checked {
  background: var(--color-primary, #119fdd);
}

.ds-cc-toggle input:focus-visible {
  outline: 2px solid var(--color-primary, #119fdd);
  outline-offset: 2px;
}

.ds-cc-toggle input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ds-cc-toggle input::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: left 150ms ease-out;
}

.ds-cc-toggle input:checked::before {
  left: 21px;
}

.ds-cc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ds-cc-modal-actions .ds-cc-btn {
  margin: 0;
}

.ds-cc-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ds-ink, #141a26);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-cc-close:focus-visible {
  outline: 2px solid var(--color-primary, #119fdd);
  outline-offset: 2px;
}

.ds-cc-close:hover {
  color: var(--color-primary, #119fdd);
}

@media (prefers-reduced-motion: reduce) {
  .ds-cc-btn,
  .ds-cc-toggle input {
    transition: none;
  }
}

[hidden] {
  display: none !important;
}
