/* ===== Cookie Consent Banner ===== */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  padding: 16px 20px;
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 360px;
  max-width: calc(100vw - 40px);
}

.cookie-banner-text {
  font-size: 13px;
  color: #333;
  margin: 0;
  line-height: 1.5;
}

.cookie-banner-text a {
  color: var(--secondary-color, #1a73e8);
  text-decoration: underline;
}

.cookie-banner-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.cookie-btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.cookie-btn-primary {
  background: var(--secondary-color, #1a73e8);
  color: #fff;
}

.cookie-btn-primary:hover { opacity: 0.9; }

.cookie-btn-secondary {
  background: #fff;
  border: 1px solid #ccc;
  color: #333;
}

.cookie-btn-secondary:hover { background: #f5f5f5; }

/* ===== Cookie Preferences Panel ===== */
#cookie-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.cookie-panel-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cookie-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.cookie-panel-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.cookie-panel-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0 4px;
}

.cookie-panel-close:hover { color: #333; }

.cookie-panel-body {
  overflow-y: auto;
  flex: 1;
}

.cookie-category {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.cookie-category:last-child { border-bottom: none; }

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

.cookie-category strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #222;
}

.cookie-category p {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.cookie-always-on {
  font-size: 12px;
  color: #4caf50;
  font-weight: 600;
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.cookie-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--secondary-color, #1a73e8);
}

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

.cookie-panel-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Footer preferences link */
.cookie-preferences-link {
  font-size: 11px;
  color: #888;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0 0 0;
  display: block;
}

.cookie-preferences-link:hover {
  text-decoration: underline;
  color: #555;
}
