/* =============================================================
   COOKIE CONSENT — Light Luxury Theme (Horizontal Floating Bar)
   GDPR / DSGVO Compliant, Scroll-Triggered
   ============================================================= */

/* ── Banner Container (Floating Horizontal Bar) ── */
#cb-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(160%);
  z-index: 99990;
  width: min(1080px, calc(100% - 32px));
  background: rgba(250, 247, 242, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(181, 148, 97, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease, visibility 0.45s ease;
  color: #1A1A1A;
  font-family: inherit;
}

#cb-cookie-banner.cb-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Banner Horizontal Layout */
.cb-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cb-banner-left {
  flex: 1;
  min-width: 0;
}

/* Header & Title */
.cb-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cb-banner-icon {
  font-size: 18px;
  line-height: 1;
}

.cb-banner-title {
  font-size: 14px;
  font-weight: 800;
  color: #1A1A1A;
  letter-spacing: -0.01em;
}

.cb-banner-text {
  font-size: 12px;
  line-height: 1.5;
  color: #555555;
  margin: 0 0 8px;
}

.cb-banner-links {
  font-size: 11px;
  color: #888888;
}

.cb-banner-links a {
  color: #B59461;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.cb-banner-links a:hover {
  color: #1A1A1A;
  text-decoration: underline;
}

/* Action Buttons (Horizontal Group) */
.cb-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cb-btn-accept {
  height: 44px;
  padding: 0 24px;
  border-radius: 10px;
  background: #1A1A1A;
  border: none;
  color: #FAF7F2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.cb-btn-accept:hover {
  background: #B59461;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(181, 148, 97, 0.25);
}

.cb-btn-essential,
.cb-btn-settings {
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #333333;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cb-btn-essential:hover,
.cb-btn-settings:hover {
  background: #FFFFFF;
  border-color: rgba(181, 148, 97, 0.4);
  color: #1A1A1A;
}

/* ── Preferences Modal (Light Theme) ── */
#cb-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: rgba(10, 10, 15, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cb-cookie-modal-overlay.cb-show {
  opacity: 1;
  visibility: visible;
}

#cb-cookie-modal {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  background: #FCFBF9;
  border: 1px solid rgba(181, 148, 97, 0.25);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #1A1A1A;
  font-family: inherit;
}

#cb-cookie-modal-overlay.cb-show #cb-cookie-modal {
  transform: scale(1);
}

.cb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cb-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #1A1A1A;
}

.cb-modal-close {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cb-modal-close:hover {
  color: #000;
  border-color: rgba(0, 0, 0, 0.2);
}

.cb-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 60vh;
}

/* Category Toggles */
.cb-cat-item {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.cb-cat-item:last-child {
  margin-bottom: 0;
}

.cb-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cb-cat-name {
  font-size: 13px;
  font-weight: 700;
  color: #1A1A1A;
}

.cb-cat-desc {
  font-size: 11px;
  line-height: 1.55;
  color: #666666;
}

/* Switch Toggle UI */
.cb-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.12);
  transition: 0.3s;
  border-radius: 24px;
}

.cb-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #999999;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .cb-slider {
  background-color: rgba(181, 148, 97, 0.2);
  border-color: #B59461;
}

input:checked + .cb-slider:before {
  transform: translateX(20px);
  background-color: #B59461;
}

input:disabled + .cb-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cb-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 10px;
}

.cb-btn-save {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  background: #1A1A1A;
  border: none;
  color: #FAF7F2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cb-btn-save:hover {
  background: #B59461;
  color: #FFFFFF;
}

/* Mobile Responsive Adjustments */
@media (max-width: 840px) {
  .cb-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .cb-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  .cb-btn-accept, .cb-btn-essential, .cb-btn-settings {
    width: 100%;
  }
}
