.cookie-banner[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 1200;
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  padding: 18px;
}

.cookie-banner__content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.cookie-banner__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.cookie-banner__text {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
  font-size: 0.95rem;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-btn {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-btn:hover {
  transform: translateY(-1px);
}

.cookie-btn--primary {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.cookie-btn--ghost {
  background: #f9fafb;
}

.cookie-btn--link {
  background: transparent;
  border-color: transparent;
  color: #2563eb;
  padding-left: 0;
  padding-right: 0;
}

.cookie-modal-open {
  overflow: hidden;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.55);
}

.cookie-modal__dialog {
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #d9dee7;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.cookie-modal__header,
.cookie-modal__footer {
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.cookie-modal__footer {
  border-bottom: 0;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}

.cookie-modal__body {
  padding: 20px;
}

.cookie-modal__intro {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.6;
}

.cookie-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid #eef2f7;
}

.cookie-option:first-child {
  border-top: 0;
  padding-top: 0;
}

.cookie-option__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.cookie-option__text {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
  font-size: 0.94rem;
}

.cookie-switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

.cookie-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cookie-switch__slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.cookie-switch__slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.cookie-switch input:checked + .cookie-switch__slider {
  background: #111827;
}

.cookie-switch input:checked + .cookie-switch__slider::before {
  transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-switch__slider {
  background: #9ca3af;
  cursor: not-allowed;
}

.cookie-manage-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.cookie-manage-link:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .cookie-banner__content {
    grid-template-columns: 1fr;
  }

  .cookie-banner__actions {
    justify-content: flex-start;
  }

  .cookie-modal__footer {
    justify-content: stretch;
  }

  .cookie-modal__footer .cookie-btn {
    width: 100%;
  }
}
