/* I.88 — Cookie consent banner styles. WCAG-AAA contrast on dark
   storefront theme. Keep self-contained — the banner ships on every
   page. */

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #0e1217;
  color: #f5f5f7;
  border-top: 2px solid rgba(94, 234, 212, 0.6);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.55);
  padding: 1rem 1.25rem 1.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

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

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-consent-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f5f5f7;
}

.cookie-consent-desc {
  margin: 0 0 1rem;
  color: rgba(245, 245, 247, 0.85);
  font-size: 0.95rem;
  line-height: 1.45;
}

.cookie-consent-desc a {
  color: #5eead4;
  text-decoration: underline;
}

.cookie-consent-desc a:focus-visible,
.cookie-consent-desc a:hover {
  color: #2dd4bf;
}

.cookie-consent-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-consent .btn-primary,
.cookie-consent .btn-secondary,
.cookie-consent .btn-link {
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  font-weight: 600;
  min-height: 44px;          /* WCAG 2.5.5 target size */
  min-width: 44px;
}

.cookie-consent .btn-primary {
  background: #2dd4bf;
  color: #0e1217;
  border-color: #2dd4bf;
}

.cookie-consent .btn-primary:focus-visible {
  outline: 3px solid #5eead4;
  outline-offset: 2px;
}

.cookie-consent .btn-secondary {
  background: transparent;
  color: #f5f5f7;
  border-color: rgba(245, 245, 247, 0.45);
}

.cookie-consent .btn-secondary:focus-visible {
  outline: 3px solid #5eead4;
  outline-offset: 2px;
}

.cookie-consent .btn-link {
  background: transparent;
  color: #5eead4;
  border-color: transparent;
  text-decoration: underline;
}

.cookie-consent .btn-link:focus-visible {
  outline: 3px solid #5eead4;
  outline-offset: 2px;
}

.cookie-consent-settings {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 245, 247, 0.18);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.cookie-consent-settings[hidden] { display: none; }

.cc-cat {
  border: 1px solid rgba(245, 245, 247, 0.18);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  margin: 0;
}

.cc-cat legend {
  font-weight: 600;
  padding: 0 0.4rem;
  color: #5eead4;
}

.cc-cat-desc {
  margin: 0.25rem 0 0.6rem;
  font-size: 0.85rem;
  color: rgba(245, 245, 247, 0.75);
  line-height: 1.4;
}

.cc-cat-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
}

.cc-cat-toggle input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #2dd4bf;
}

.cc-cat-toggle input[disabled] + span {
  color: rgba(245, 245, 247, 0.6);
}

.cc-settings-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

/* Footer "Cookie-Einstellungen" link */
.cookie-settings-footer-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-settings-footer-btn:focus-visible {
  outline: 3px solid #5eead4;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Account deletion danger zone */
.account-danger-zone {
  border: 2px solid #fb7185;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  background: rgba(248, 113, 113, 0.08);
}

.account-danger-zone h2 {
  color: #fb7185;
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.account-danger-zone p {
  margin: 0 0 1rem;
  color: rgba(245, 245, 247, 0.85);
  font-size: 0.92rem;
}

.account-danger-zone .btn-danger {
  background: #b91c1c;
  color: #fff;
  border: 2px solid #b91c1c;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.account-danger-zone .btn-danger:focus-visible,
.account-danger-zone .btn-danger:hover {
  outline: 3px solid #fb7185;
  outline-offset: 2px;
}

.delete-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.delete-modal-backdrop[hidden] { display: none; }

.delete-modal {
  background: #161b22;
  color: #f5f5f7;
  border: 1px solid rgba(245, 245, 247, 0.16);
  border-radius: 10px;
  max-width: 540px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

.delete-modal h3 {
  margin: 0 0 0.75rem;
  color: #fb7185;
}

.delete-modal p { line-height: 1.5; margin: 0 0 1rem; }

.delete-modal label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.delete-modal input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 245, 247, 0.32);
  background: #0e1217;
  color: #f5f5f7;
  min-height: 44px;
}

.delete-modal input[type="text"]:focus-visible {
  outline: 3px solid #5eead4;
  outline-offset: 2px;
}

.delete-modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.delete-modal .btn-secondary {
  background: transparent;
  color: #f5f5f7;
  border: 1px solid rgba(245, 245, 247, 0.4);
  border-radius: 6px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  min-height: 44px;
  font: inherit;
}

.delete-modal .btn-danger {
  background: #b91c1c;
  color: #fff;
  border: 2px solid #b91c1c;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  font: inherit;
}

.delete-modal .btn-danger:disabled {
  background: rgba(185, 28, 28, 0.4);
  border-color: rgba(185, 28, 28, 0.4);
  cursor: not-allowed;
}

.delete-modal-msg {
  margin-top: 0.75rem;
  min-height: 1.25rem;
}

.delete-modal-msg.is-error { color: #fb7185; }
.delete-modal-msg.is-success { color: #4ade80; }

/* Invoice download button */
.order-invoice-actions {
  margin: 1.25rem 0;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-invoice {
  background: #f5f5f7;
  color: #0e1217;
  border: 1px solid #f5f5f7;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-invoice:hover,
.btn-invoice:focus-visible {
  background: #5eead4;
  color: #0e1217;
  outline: 3px solid #5eead4;
  outline-offset: 2px;
  text-decoration: none;
}

@media (prefers-color-scheme: light) {
  /* WCAG-AAA: storefront theme is dark-only so light scheme just
     uses the same palette. Reserved for future light theme. */
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent { transition: none; }
}
