/* Cookie Consent Banner - GDPR UE */

#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #ffffff;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12);
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

#cookie-consent-banner.visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text h3 {
  font-size: 17px;
  font-weight: 600;
  color: #343638;
  margin-bottom: 8px;
}

.cookie-banner-text p {
  font-size: 14px;
  line-height: 22px;
  color: #848991;
  margin: 0;
}

.cookie-banner-text a {
  color: #2293D7;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 22px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #2293D7;
  color: #fff;
  border-color: #2293D7;
}
.cookie-btn-accept:hover { background: #1a7ab8; }

.cookie-btn-reject {
  background: transparent;
  color: #343638;
  border-color: #ddd;
}
.cookie-btn-reject:hover { border-color: #999; }

.cookie-btn-settings {
  background: transparent;
  color: #2293D7;
  border-color: #2293D7;
}
.cookie-btn-settings:hover { background: #2293D7; color: #fff; }

/* Settings modal */
#cookie-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

#cookie-settings-modal.open {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cookie-modal-box {
  position: relative;
  background: #fff;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.cookie-modal-box h2 {
  font-size: 24px;
  color: #343638;
  margin-bottom: 12px;
}

.cookie-modal-box > p {
  font-size: 14px;
  line-height: 22px;
  color: #848991;
  margin-bottom: 24px;
}

.cookie-category {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-category-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: #343638;
  margin: 0;
}

.cookie-category p {
  font-size: 13px;
  line-height: 20px;
  color: #848991;
  margin: 8px 0 0;
}

.cookie-category .always-on {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #2293D7;
  letter-spacing: 0.5px;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

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

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #2293D7;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cookie-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px;
}
.cookie-modal-close:hover { color: #343638; }

/* Floating reopen preferences button */
#cookie-preferences-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 899;
  background: #343638;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  letter-spacing: 0.5px;
}

#cookie-preferences-btn.visible {
  opacity: 1;
  visibility: visible;
}

#cookie-preferences-btn:hover {
  background: #2293D7;
}

@media (max-width: 767px) {
  #cookie-consent-banner { padding: 16px; }
  .cookie-banner-inner { flex-direction: column; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; min-width: 0; }
  #cookie-preferences-btn { bottom: 90px; left: 16px; }
}
