/*!
 * Cookie Banner — Stylesheet
 * ─────────────────────────────────────────────────────────────
 * @version     1.0.0
 * @author      Janno Wind
 * @created     2026-04-25
 * @updated     2026-04-25
 * ─────────────────────────────────────────────────────────────
 */

/* ---- Overlay (Backdrop) ---- */
#cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}
#cookie-overlay.ck-visible {
  display: flex;
}

/* ---- Modal ---- */
#cookie-modal {
  background: #fff;
  border-radius: 6px;
  width: 90%;
  max-width: 440px;
  max-height: 88vh;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

/* Fokus sichtbar auf dem Modal selbst (axe / WAVE) */
#cookie-modal:focus-visible,
#cookie-modal:focus {
  outline: 3px solid #4338CA;
  outline-offset: 4px;
}

/* Scrollbarer innerer Bereich */
#cookie-modal-inner {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0; /* Pflicht bei Flex: ohne das scrollt der Body nicht */
}

/* ---- Header ---- */
#cookie-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid #eee;
}
#cookie-header span {
  font-size: 28px;
  flex-shrink: 0;
}
#cookie-header p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #111;
}

/* ---- Beschreibungstext ---- */
#cookie-text {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}
#cookie-text p {
  margin: 0;
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}

/* ---- Checkboxen ---- */
#cookie-checkboxes {
  padding: 1rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #eee;
  align-items: center;
}
.cookie-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
}
.cookie-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #111;
  cursor: pointer;
}
.cookie-check input[type="checkbox"]:focus-visible {
  outline: 2px solid #4338CA;
  outline-offset: 2px;
}
.cookie-check input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ---- Details-Panel ---- */
#cookie-details {
  display: none;
  border-bottom: 1px solid #eee;
}
#cookie-details.ck-open {
  display: block;
}

.ck-detail-group {
  border-bottom: 1px solid #eee;
}
.ck-detail-group:last-child {
  border-bottom: none;
}

.ck-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  user-select: none;
  border-radius: 0;
}
.ck-detail-header:hover {
  background: #f9f9f9;
}
.ck-detail-header:focus-visible {
  outline: 2px solid #4338CA;
  outline-offset: -2px;
}
.ck-detail-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ck-detail-header-left input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #111;
  cursor: pointer;
}
.ck-detail-header-left input[type="checkbox"]:focus-visible {
  outline: 2px solid #4338CA;
  outline-offset: 2px;
}
.ck-detail-header-left strong {
  font-size: 14px;
  color: #111;
}

.ck-detail-arrow {
  font-size: 11px;
  color: #999;
  transition: transform 0.2s;
}
.ck-detail-group.ck-expanded .ck-detail-arrow {
  transform: rotate(180deg);
}

.ck-detail-body {
  display: none;
  padding: 0 1.5rem 1rem;
}
.ck-detail-group.ck-expanded .ck-detail-body {
  display: block;
}

.ck-service {
  background: #f7f7f7;
  border-radius: 4px;
  padding: 0.8rem 1rem;
  margin-bottom: 8px;
  font-size: 12px;
  color: #444;
  line-height: 1.6;
}
.ck-service:last-child { margin-bottom: 0; }
.ck-service strong {
  display: block;
  font-size: 13px;
  color: #111;
  margin-bottom: 4px;
}
.ck-service span { display: block; margin-top: 2px; }
.ck-service a { color: #555; }
.ck-service a:focus-visible {
  outline: 2px solid #4338CA;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Haupt-Buttons ---- */
#cookie-buttons {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid #eee;
}
#cookie-buttons button {
  width: 100%;
  padding: 11px;
  border-radius: 4px;
  border: 1.5px solid #222;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #111;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: Arial, Helvetica, sans-serif;
}
#cookie-buttons button:hover {
  background: #C62F41;
  border-color: #C62F41;
  color: #fff;
}
#cookie-buttons button:focus-visible {
  outline: 3px solid #4338CA;
  outline-offset: 2px;
}

/* ---- Footer ---- */
#cookie-footer {
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
#cookie-footer a,
#cookie-footer button {
  font-size: 12px;
  color: #595959;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}
#cookie-footer a:hover,
#cookie-footer button:hover {
  color: #111;
  text-decoration: underline;
}
#cookie-footer a:focus-visible,
#cookie-footer button:focus-visible {
  outline: 2px solid #4338CA;
  outline-offset: 2px;
  border-radius: 2px;
}
