/* ============================================================
   OEM:plus – Cookie-Banner
   DSGVO / TDDDG konform | Stand: März 2026
   ============================================================ */

/* ---- OVERLAY ---- */
#cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#cookie-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ---- BANNER ---- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #111111;
  border-top: 1px solid rgba(12, 208, 255, 0.25);
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.5);
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Inter', sans-serif;
}
#cookie-banner.visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px;
}

/* ---- HEADER ROW ---- */
.cookie-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cookie-icon {
  width: 36px;
  height: 36px;
  background: rgba(12, 208, 255, 0.12);
  border: 1px solid rgba(12, 208, 255, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.cookie-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}
.cookie-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(12, 208, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- TEXT ---- */
.cookie-text {
  font-size: 0.85rem;
  color: #aaaaaa;
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 760px;
}
.cookie-text a {
  color: #0cd0ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-text a:hover {
  color: #ffffff;
}

/* ---- DETAILS / TOGGLES ---- */
.cookie-details {
  display: none;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.cookie-details.open {
  display: block;
}

.cookie-category {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.cookie-category:last-child {
  border-bottom: none;
}

.cookie-cat-toggle {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #333;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #666;
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(12, 208, 255, 0.25);
  border: 1px solid rgba(12, 208, 255, 0.5);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: #0cd0ff;
}
.toggle-switch input:disabled + .toggle-slider {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-cat-info {
  flex: 1;
}
.cookie-cat-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-cat-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  color: #888;
}
.cookie-cat-badge.required {
  background: rgba(12, 208, 255, 0.1);
  color: #0cd0ff;
}
.cookie-cat-desc {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.55;
}
.cookie-cat-desc strong {
  color: #aaa;
  font-weight: 600;
}

/* ---- ACTIONS ---- */
.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.cookie-btn-accept {
  background: #0cd0ff;
  color: #000000;
}
.cookie-btn-accept:hover {
  background: #00e5ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(12, 208, 255, 0.35);
}
.cookie-btn-necessary {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.cookie-btn-necessary:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
}
.cookie-btn-settings {
  background: transparent;
  color: #888;
  border: 1.5px solid rgba(255,255,255,0.1);
  margin-left: auto;
}
.cookie-btn-settings:hover {
  color: #aaa;
  border-color: rgba(255,255,255,0.25);
}
.cookie-btn-save {
  background: #1a1a1a;
  color: #0cd0ff;
  border: 1.5px solid rgba(12, 208, 255, 0.3);
}
.cookie-btn-save:hover {
  background: rgba(12, 208, 255, 0.1);
  border-color: rgba(12, 208, 255, 0.6);
}

/* ---- LEGAL FOOTER ---- */
.cookie-legal {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-legal-link {
  font-size: 0.72rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}
.cookie-legal-link:hover {
  color: #888;
}
.cookie-legal-sep {
  color: #333;
  font-size: 0.72rem;
}

/* ---- REOPEN BUTTON (Consent Manager) ---- */
#cookie-reopen {
  position: fixed !important;
  bottom: 80px !important;
  left: 20px !important;
  right: auto !important;
  top: auto !important;
  z-index: 99999 !important;
  background: #1e1e1e;
  border: 1px solid rgba(12, 208, 255, 0.35);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #aaa;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: none;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 1px rgba(12,208,255,0.15), 0 4px 16px rgba(0,0,0,0.8);
}
#cookie-reopen:hover {
  color: #fff;
  border-color: rgba(12, 208, 255, 0.7);
  background: #252525;
}
#cookie-reopen.show {
  display: inline-flex !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .cookie-inner {
    padding: 20px 16px;
  }
  .cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-btn-settings {
    margin-left: 0;
    text-align: center;
    justify-content: center;
  }
  .cookie-btn {
    justify-content: center;
  }
  .cookie-legal {
    gap: 10px;
  }
}
