/* Cookie Banner Styles */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  width: calc(100% - 40px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.cookie-banner.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner-content {
  padding: 24px;
}

/* Header */
.cookie-banner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cookie-icon {
  font-size: 24px;
  line-height: 1;
}

.cookie-banner-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

/* Message */
.cookie-message {
  margin: 0 0 20px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #666666;
}

.cookie-link {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.cookie-link:hover {
  color: #444444;
}

/* Preferences Panel */
.cookie-preferences {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 12px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.preference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.preference-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preference-info strong {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.required-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: #e8e8e8;
  color: #666666;
  border-radius: 12px;
}

.preference-desc {
  margin: 0 0 16px 0;
  font-size: 12px;
  color: #888888;
  line-height: 1.5;
}

.preference-desc:last-of-type {
  margin-bottom: 0;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

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

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #1a1a1a;
}

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

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

/* Preferences Actions */
.preferences-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  text-align: right;
}

.btn-save {
  padding: 10px 20px;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-save:hover {
  background: #333333;
}

.btn-save:active {
  transform: scale(0.98);
}

/* Main Actions */
.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-manage {
  margin-right: auto;
  padding: 0;
  background: none;
  border: none;
  color: #1a1a1a;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.btn-manage:hover {
  color: #444444;
}

.btn-accept {
  padding: 12px 24px;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-accept:hover {
  background: #333333;
}

.btn-accept:active {
  transform: scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
  }
  
  .cookie-banner-content {
    padding: 20px;
  }
  
  .cookie-actions {
    flex-direction: column-reverse;
    gap: 12px;
  }
  
  .btn-manage,
  .btn-accept {
    width: 100%;
    text-align: center;
  }
  
  .btn-manage {
    padding: 8px;
  }
}
