/* =============================================
   COOKIE BANNER & CONSENT MODAL
   BeWo Telehealthcare
   ============================================= */

/* ── Banner (Bottom-Bar) ──────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #fff;
  border-top: 2px solid #E4E2DC;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.12);
  padding: 20px 24px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}
.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.cookie-banner__text {
  flex: 1;
  min-width: 240px;
}
.cookie-banner__text h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1A1917;
  margin-bottom: 4px;
}
.cookie-banner__text p {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  color: #696663;
  line-height: 1.55;
  margin: 0;
}
.cookie-banner__text a {
  color: #D92B2B;
  text-decoration: underline;
}
.cookie-banner__text a:hover { color: #b01e1e; }

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

/* Buttons */
.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 100px;
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1.3;
}
.cb-btn:focus-visible {
  outline: 3px solid #D92B2B;
  outline-offset: 3px;
}
.cb-btn--accept {
  background: #D92B2B;
  color: white;
  border-color: #D92B2B;
}
.cb-btn--accept:hover {
  background: #b01e1e;
  border-color: #b01e1e;
  transform: translateY(-1px);
}
.cb-btn--necessary {
  background: white;
  color: #1A1917;
  border-color: #E4E2DC;
}
.cb-btn--necessary:hover {
  border-color: #1A1917;
  background: #F3F2EF;
}
.cb-btn--settings {
  background: transparent;
  color: #696663;
  border-color: transparent;
  padding-left: 8px;
  padding-right: 8px;
}
.cb-btn--settings:hover {
  color: #1A1917;
  background: #F3F2EF;
  border-color: #E4E2DC;
}

/* ── Modal Overlay ────────────────────────── */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(26,25,23,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cookie-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ────────────────────────────────── */
.cookie-modal {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 92dvh;
  overflow-y: auto;
  box-shadow: 0 -8px 48px rgba(0,0,0,0.18);
  transform: translateY(40px);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  padding: 32px 28px 28px;
  box-sizing: border-box;
}
.cookie-modal-overlay.is-visible .cookie-modal {
  transform: translateY(0);
}

.cookie-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.cookie-modal__title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1A1917;
}
.cookie-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #F3F2EF;
  color: #4A4844;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.cookie-modal__close:hover { background: #E4E2DC; color: #1A1917; }
.cookie-modal__close:focus-visible { outline: 3px solid #D92B2B; outline-offset: 2px; }

.cookie-modal__lead {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  color: #696663;
  line-height: 1.6;
  margin-bottom: 24px;
}
.cookie-modal__lead a { color: #D92B2B; text-decoration: underline; }
.cookie-modal__lead a:hover { color: #b01e1e; }

/* ── Cookie Category Items ─────────────────── */
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid #E4E2DC;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

.cookie-category {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: white;
  border-bottom: 1.5px solid #E4E2DC;
  transition: background 0.15s;
}
.cookie-category:last-child { border-bottom: none; }
.cookie-category:hover { background: #FAFAF8; }

.cookie-category__info { flex: 1; }
.cookie-category__name {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1A1917;
  margin-bottom: 4px;
}
.cookie-category__desc {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  color: #696663;
  line-height: 1.55;
}

/* Always-on badge */
.cookie-category__always {
  flex-shrink: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3A9E48;
  background: #edf7ef;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  margin-top: 2px;
}

/* Toggle switch */
.cb-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}
.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cb-toggle__track {
  position: absolute;
  inset: 0;
  background: #E4E2DC;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s;
}
.cb-toggle input:checked + .cb-toggle__track {
  background: #3A9E48;
}
.cb-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
.cb-toggle input:checked + .cb-toggle__track::after {
  transform: translateX(20px);
}
.cb-toggle input:focus-visible + .cb-toggle__track {
  outline: 3px solid #D92B2B;
  outline-offset: 2px;
}

/* ── Modal Footer ─────────────────────────── */
.cookie-modal__footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-modal__footer .cb-btn {
  flex: 1;
  min-width: 140px;
}

/* ── Re-open button (Footer-Link) ─────────── */
.cookie-reopen-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: inherit;
  color: rgba(255,255,255,0.82); /* explizit hell für dunklen Footer-Hintergrund (#111110) */
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  transition: color 0.15s;
}
.cookie-reopen-link:hover { color: #ff6b6b; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 680px) {
  .cookie-banner__inner { gap: 16px; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .cb-btn { flex: 1; min-width: 0; }
  .cookie-modal { border-radius: 20px 20px 0 0; padding: 24px 20px 20px; }
  .cookie-modal__footer { flex-direction: column; }
  .cookie-modal__footer .cb-btn { flex: none; width: 100%; }
}
