.cookie-consent-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  width: min(520px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid #dfd2c6;
  border-radius: 8px;
  background: #fffdf9;
  color: #2a2724;
  box-shadow: 0 16px 42px rgba(65, 43, 29, 0.2);
  font-family: "Manrope", Arial, sans-serif;
}

.cookie-consent-banner[hidden],
.cookie-consent-dialog[hidden] {
  display: none;
}

.cookie-consent-banner h2,
.cookie-consent-dialog h2 {
  margin: 0 0 8px;
  color: #2a2724;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
}

.cookie-consent-banner p,
.cookie-consent-dialog p {
  margin: 0;
  color: #665c55;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent-banner a,
.cookie-consent-dialog a {
  color: #7b4f34;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.cookie-consent-button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #d8c9bc;
  border-radius: 8px;
  background: #fffaf4;
  color: #65452f;
  font: 700 14px/1.2 "Manrope", Arial, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
}

.cookie-consent-button:hover {
  border-color: #9a6848;
  background: #f8eee5;
}

.cookie-consent-button:focus-visible,
.cookie-settings-link:focus-visible {
  outline: 3px solid rgba(138, 93, 63, 0.3);
  outline-offset: 2px;
}

.cookie-consent-button-primary {
  border-color: #8a5d3f;
  background: #8a5d3f;
  color: #fff;
}

.cookie-consent-button-primary:hover {
  border-color: #6e462d;
  background: #6e462d;
}

.cookie-consent-dialog {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(42, 39, 36, 0.5);
  font-family: "Manrope", Arial, sans-serif;
}

.cookie-consent-panel {
  width: min(590px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow-y: auto;
  border: 1px solid #dfd2c6;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 22px 54px rgba(34, 24, 18, 0.28);
}

.cookie-consent-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #eadfd5;
}

.cookie-consent-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d8c9bc;
  border-radius: 50%;
  background: #fff;
  color: #65452f;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.cookie-consent-categories {
  display: grid;
  gap: 0;
  padding: 0 20px;
}

.cookie-consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid #eadfd5;
}

.cookie-consent-category:last-child {
  border-bottom: 0;
}

.cookie-consent-category h3 {
  margin: 0 0 4px;
  color: #2a2724;
  font: 800 15px/1.35 "Manrope", Arial, sans-serif;
  letter-spacing: 0;
}

.cookie-consent-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ede5dc;
  color: #5f5148;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cookie-consent-status-active {
  background: #e5efe7;
  color: #2f6840;
}

.cookie-consent-dialog .cookie-consent-actions {
  margin: 0;
  padding: 16px 20px 20px;
  border-top: 1px solid #eadfd5;
}

.cookie-settings-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.legal-links .cookie-settings-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #c8b6a7;
  border-radius: 999px;
  background: #f8f1ea;
  color: #5f4332;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.legal-links .cookie-settings-link:hover {
  background: #f1e5da;
  transform: translateY(-1px);
}

.legal-footer .cookie-settings-link {
  color: var(--accent-dark, #6e462d);
  font-weight: 700;
  text-decoration: none;
}

.legal-footer .cookie-settings-link:hover {
  color: var(--accent, #8a5d3f);
}

body.cookie-consent-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .cookie-consent-banner {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    padding: 16px;
  }

  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-consent-button {
    width: 100%;
  }

  .cookie-consent-dialog {
    align-items: end;
    padding: 10px;
  }

  .cookie-consent-panel {
    max-height: calc(100vh - 20px);
  }

  .cookie-consent-header,
  .cookie-consent-categories,
  .cookie-consent-dialog .cookie-consent-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cookie-consent-category {
    grid-template-columns: 1fr;
  }

  .cookie-consent-status {
    justify-self: start;
  }
}
