/* =============================================
   COOKIE-CONSENT.CSS
   Cookie-Banner + Detaileinstellungen
   Nutzt die Design-Tokens der Website mit Fallbacks
   ============================================= */

.cc-root {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------------------------------------------
   BANNER (untere Leiste)
--------------------------------------------- */
.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1085;
  padding: 1rem;
  background: var(--warm-white, #fff);
  border-top: 1px solid var(--border, #e8e2d8);
  box-shadow: 0 -12px 40px rgba(26, 26, 46, 0.12);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.cc-banner[hidden] {
  display: none;
}

.cc-banner.is-visible {
  transform: translateY(0);
}

.cc-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
}

.cc-banner__body {
  flex: 1 1 22rem;
  min-width: 0;
}

.cc-banner__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.45rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink, #1a1a2e);
}

.cc-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--gold-soft, rgba(200, 153, 63, 0.1));
  color: var(--gold, #c8993f);
  font-size: 1rem;
  flex: none;
}

.cc-banner__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-light, #4a4a5e);
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex: 0 1 auto;
  align-items: center;
}

.cc-link {
  color: var(--primary, #1b3a5c);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-link:hover {
  color: var(--gold-dark, #a67d2e);
}

/* ---------------------------------------------
   BUTTONS
--------------------------------------------- */
.cc-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 50rem;
  border: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.cc-btn--sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
}

.cc-btn--primary {
  background: linear-gradient(135deg, var(--primary, #1b3a5c), var(--primary-light, #2a5a8c));
  color: #fff;
  box-shadow: var(--shadow, 0 4px 16px rgba(26, 26, 46, 0.06));
}

.cc-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 8px 30px rgba(26, 26, 46, 0.08));
}

.cc-btn--outline {
  background: transparent;
  border-color: var(--primary, #1b3a5c);
  color: var(--primary, #1b3a5c);
}

.cc-btn--outline:hover {
  background: var(--primary-soft, rgba(27, 58, 92, 0.06));
}

.cc-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-light, #4a4a5e);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-btn--ghost:hover {
  color: var(--ink, #1a1a2e);
}

.cc-btn:focus-visible {
  outline: 3px solid var(--gold-light, #e2b964);
  outline-offset: 2px;
}

/* ---------------------------------------------
   DETAILANSICHT (Dialog)
--------------------------------------------- */
.cc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1086;
  background: rgba(26, 26, 46, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s var(--ease-smooth, ease);
}

.cc-backdrop[hidden] {
  display: none;
}

.cc-backdrop.is-visible {
  opacity: 1;
}

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

.cc-modal[hidden] {
  display: none;
}

.cc-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 40rem;
  max-height: calc(100vh - 2.5rem);
  background: var(--warm-white, #fff);
  border: 1px solid var(--border, #e8e2d8);
  border-radius: var(--radius-lg, 1.25rem);
  box-shadow: var(--shadow-xl, 0 24px 64px rgba(26, 26, 46, 0.14));
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 0.3s var(--ease-out, ease), opacity 0.3s var(--ease-out, ease);
}

.cc-modal.is-visible .cc-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cc-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.6rem 1rem;
  border-bottom: 1px solid var(--border-light, #f2ede5);
}

.cc-dialog__title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink, #1a1a2e);
}

.cc-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--primary-soft, rgba(27, 58, 92, 0.06));
  color: var(--ink-light, #4a4a5e);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth, ease);
}

.cc-close:hover {
  background: var(--primary, #1b3a5c);
  color: #fff;
}

.cc-close:focus-visible {
  outline: 3px solid var(--gold-light, #e2b964);
  outline-offset: 2px;
}

.cc-dialog__body {
  padding: 1.25rem 1.6rem;
  overflow-y: auto;
}

.cc-dialog__intro {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-light, #4a4a5e);
}

.cc-dialog__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 1.1rem 1.6rem 1.35rem;
  border-top: 1px solid var(--border-light, #f2ede5);
  background: var(--cream, #fff9f0);
  border-radius: 0 0 var(--radius-lg, 1.25rem) var(--radius-lg, 1.25rem);
}

/* ---------------------------------------------
   KATEGORIEN
--------------------------------------------- */
.cc-cat {
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border, #e8e2d8);
  border-radius: var(--radius, 0.75rem);
  background: #fff;
}

.cc-cat:last-child {
  margin-bottom: 0;
}

.cc-cat--locked {
  background: var(--primary-soft, rgba(27, 58, 92, 0.06));
  border-style: dashed;
}

.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.cc-cat__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink, #1a1a2e);
}

.cc-cat__badge {
  flex: none;
  padding: 0.28rem 0.8rem;
  border-radius: 50rem;
  background: var(--gold-soft, rgba(200, 153, 63, 0.1));
  color: var(--gold-dark, #a67d2e);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cc-cat__text {
  margin: 0;
  font-size: 0.845rem;
  line-height: 1.6;
  color: var(--ink-light, #4a4a5e);
}

/* ---------------------------------------------
   SCHALTER
--------------------------------------------- */
.cc-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.cc-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cc-switch__track {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  flex: none;
  border-radius: 50rem;
  background: var(--cream-dark, #f0e6d4);
  border: 1px solid var(--border, #e8e2d8);
  transition: background 0.25s var(--ease-smooth, ease), border-color 0.25s var(--ease-smooth, ease);
}

.cc-switch__thumb {
  position: absolute;
  top: 50%;
  left: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(26, 26, 46, 0.2);
  transform: translateY(-50%);
  transition: transform 0.25s var(--ease-bounce, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.cc-switch input:checked + .cc-switch__track {
  background: var(--primary, #1b3a5c);
  border-color: var(--primary, #1b3a5c);
}

.cc-switch input:checked + .cc-switch__track .cc-switch__thumb {
  transform: translate(1.2rem, -50%);
}

.cc-switch input:focus-visible + .cc-switch__track {
  outline: 3px solid var(--gold-light, #e2b964);
  outline-offset: 2px;
}

.cc-switch__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-light, #4a4a5e);
}

.cc-switch input:checked ~ .cc-switch__label {
  color: var(--primary, #1b3a5c);
}

/* ---------------------------------------------
   PLATZHALTER FUER BLOCKIERTE INHALTE
--------------------------------------------- */
.cc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  height: 100%;
  min-height: 18rem;
  padding: 1.75rem 1.25rem;
  text-align: center;
  background:
    repeating-linear-gradient(
      45deg,
      var(--cream, #fff9f0),
      var(--cream, #fff9f0) 12px,
      var(--warm-white, #fefcf8) 12px,
      var(--warm-white, #fefcf8) 24px
    );
  border: 1px dashed var(--border, #e8e2d8);
  border-radius: inherit;
}

.cc-placeholder__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.35rem;
  border-radius: 50%;
  background: var(--gold-soft, rgba(200, 153, 63, 0.1));
  color: var(--gold, #c8993f);
  font-size: 1.3rem;
}

.cc-placeholder__title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink, #1a1a2e);
}

.cc-placeholder__text {
  max-width: 26rem;
  margin: 0 0 0.85rem;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--ink-light, #4a4a5e);
}

.cc-placeholder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* ---------------------------------------------
   BODY-ZUSTAENDE
--------------------------------------------- */
body.cc-modal-open {
  overflow: hidden;
}

/* ---------------------------------------------
   RESPONSIVE
--------------------------------------------- */
@media (max-width: 991.98px) {
  .cc-banner__actions {
    flex: 1 1 100%;
  }

  .cc-btn {
    flex: 1 1 12rem;
  }
}

@media (max-width: 575.98px) {
  .cc-banner {
    padding: 0.9rem 0.9rem 1rem;
    max-height: 85vh;
    overflow-y: auto;
  }

  .cc-banner__title {
    font-size: 1.05rem;
  }

  .cc-banner__text {
    font-size: 0.82rem;
  }

  .cc-btn {
    flex: 1 1 100%;
    white-space: normal;
  }

  .cc-dialog__head,
  .cc-dialog__body,
  .cc-dialog__foot {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .cc-dialog__title {
    font-size: 1.15rem;
  }

  .cc-cat__head {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .cc-placeholder {
    min-height: 14rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-backdrop,
  .cc-dialog,
  .cc-switch__thumb,
  .cc-btn {
    transition: none;
  }
}
