/* ================================================
   Cookie Banner – DSGVO-konform für Joomla 3.1
   Einbinden in: templates/DEIN_TEMPLATE/css/
   ================================================ */

#cb-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

#cb-banner {
  background: #fff;
  border-top: 3px solid #1a73e8;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: cbSlideUp 0.4s ease-out;
}

#cb-detail {
  display: none;
  background: #fff;
  border-top: 3px solid #1a73e8;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.16);
  padding: 24px;
  animation: cbSlideUp 0.35s ease-out;
}

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

/* ---- Banner-Text ---- */
#cb-text {
  flex: 1;
  min-width: 260px;
  color: #333;
}

#cb-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: #111;
}

#cb-text a {
  color: #1a73e8;
  text-decoration: underline;
}

/* ---- Buttons ---- */
#cb-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.cb-btn {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.cb-btn:active { transform: scale(0.97); }

.cb-btn-accept {
  background: #1a73e8;
  color: #fff;
}
.cb-btn-accept:hover { background: #1558b0; }

.cb-btn-essential {
  background: #f1f3f4;
  color: #333;
  border: 1px solid #dadce0;
}
.cb-btn-essential:hover { background: #e2e5e8; }

.cb-btn-settings {
  background: transparent;
  color: #1a73e8;
  border: 1px solid #1a73e8;
}
.cb-btn-settings:hover { background: #e8f0fe; }

.cb-btn-save {
  background: #1a73e8;
  color: #fff;
}
.cb-btn-save:hover { background: #1558b0; }

/* ---- Detail-Panel ---- */
#cb-detail h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: #111;
}

#cb-detail p {
  margin: 0 0 16px;
  color: #555;
}

.cb-category {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.cb-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}

.cb-cat-header:hover { background: #f0f4ff; }

.cb-cat-title {
  font-weight: 600;
  color: #222;
  font-size: 14px;
}

.cb-cat-body {
  padding: 10px 16px 14px;
  font-size: 13px;
  color: #555;
  border-top: 1px solid #eee;
  display: none;
}

.cb-cat-body.open { display: block; }

/* ---- Toggle Switch ---- */
.cb-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cb-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s;
}

.cb-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.cb-toggle input:checked + .cb-slider { background: #1a73e8; }
.cb-toggle input:checked + .cb-slider::before { transform: translateX(18px); }
.cb-toggle input:disabled + .cb-slider { background: #93bef8; cursor: not-allowed; }

/* ---- Detail-Footer ---- */
#cb-detail-footer {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* ---- Badge "immer aktiv" ---- */
.cb-always-on {
  font-size: 12px;
  color: #1a73e8;
  font-weight: 600;
  background: #e8f0fe;
  padding: 3px 8px;
  border-radius: 4px;
}

/* ---- Chevron ---- */
.cb-chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  margin-left: 8px;
  transition: transform 0.2s;
}
.cb-chevron.open { transform: rotate(-135deg); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  #cb-banner { flex-direction: column; align-items: flex-start; gap: 14px; }
  #cb-buttons { width: 100%; justify-content: stretch; }
  .cb-btn { flex: 1; text-align: center; }
}
