/* ================================
   CookieCheck Styles
================================ */

body.cookiecheck-open {
  overflow: hidden;
  touch-action: none;
}

#cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  display: none;
}

#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: #fff;
  border-top: 3px solid #0d6efd;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
  z-index: 2000;
  display: none;
  animation: slideUp 0.4s ease-out;

  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

#cookie-banner p strong {
  font-size: 1.1rem;
  color: #0d6efd;
}

#cookie-banner .btn,
#cookie-banner .cookie-link {
  min-width: 120px;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

#cookie-banner p {
  margin: 0;
  white-space: normal;
  word-break: break-word;
}

#cookie-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

#cookie-main-actions,
#cookie-details {
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

#cookie-main-actions.hidden {
  opacity: 0;
  max-height: 0;
  pointer-events: none;
}

#cookie-details {
  opacity: 0;
  max-height: 0;
}

#cookie-details.show {
  opacity: 1;
  max-height: 90vh;
}

#cookie-details .cookie-list-scroll {
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 0.5rem;
  overflow-x: hidden;
  word-break: break-word;
}

@media (max-width: 768px) {
  #cookie-details .cookie-list-scroll {
    max-height: 60vh;
  }
}

.cookie-category-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  color: #0d6efd;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: normal;
}

.cookie-category-title::before {
  content: "• ";
  color: #198754;
}
.cookie-category:first-child .cookie-category-title {
  border-top: 2px solid #dee2e6;
  padding-top: 0.5rem;
}

.cookie-service {
  padding: .5rem .75rem;
  border-radius: .5rem;
  border: 1px solid #e9ecef;
  margin-bottom: .5rem;
  word-break: break-word;
}

.cookie-service input[disabled] + label {
  color: #6c757d;
}

/* Expandable Datenschutzhinweise */
.cookie-privacy-toggle {
  display: flex;
  align-items: center;
  font-size: .875rem;
  cursor: pointer;
  user-select: none;
  margin-top: .25rem;
  margin-bottom: .25rem;
  padding: .25rem 0;
  gap: .5rem;
  color: #0d6efd;
}

.cookie-privacy-toggle::before {
  content: "▶";
  font-size: .85rem;
  transition: transform 0.2s ease;
}

.cookie-privacy-toggle.expanded::before {
  content: "▼";
}

.cookie-privacy-details {
  transition: all .25s ease-in-out;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  word-break: break-word;
}

.cookie-privacy-details.show {
  max-height: 400px;
  opacity: 1;
  margin-top: .5rem;
}

#cookie-details .detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  border-top: 1px solid #dee2e6;
  padding-top: 0.75rem;
}

/* ================================
   CHECKCOOKIE_LIST Styles
================================ */
#CHECKCOOKIE_LIST table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  word-break: break-word;
}

#CHECKCOOKIE_LIST th,
#CHECKCOOKIE_LIST td {
  border: 1px solid #dee2e6;
  padding: .5rem;
  word-break: break-word;
  white-space: normal;
}

#CHECKCOOKIE_LIST thead th {
  background: #f8f9fa;
}

#CHECKCOOKIE_LIST .cookie-privacy-toggle {
  display: flex;
  align-items: center;
  font-size: .85rem;
  color: #0d6efd;
  cursor: pointer;
  padding: .25rem 0;
  gap: .5rem;
}

#CHECKCOOKIE_LIST .cookie-privacy-toggle::before {
  content: "▶";
  font-size: .85rem;
  transition: transform 0.2s ease;
}

#CHECKCOOKIE_LIST .cookie-privacy-toggle.expanded::before {
  content: "▼";
}

#CHECKCOOKIE_LIST .cookie-privacy-details {
  transition: all .25s ease-in-out;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  word-break: break-word;
}

#CHECKCOOKIE_LIST .cookie-privacy-details.show {
  max-height: 400px;
  opacity: 1;
}
