/* Cookie Consent Banner & Modal Styles */

#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--entry);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-banner-text {
  margin-bottom: 1rem;
}

.cookie-banner-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: var(--primary);
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--content);
}

.cookie-banner-text a {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-banner-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cookie-btn-primary {
  background: var(--primary);
  color: var(--theme);
}

.cookie-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cookie-btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.cookie-btn-secondary:hover {
  background: var(--code-bg);
}

/* Cookie Modal */
#cookie-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal-content {
  background: var(--entry);
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--content);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.close-modal:hover {
  background: var(--code-bg);
}

.cookie-category {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-category-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.cookie-category-description {
  font-size: 0.9rem;
  color: var(--content);
  line-height: 1.5;
  margin: 0;
}

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

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  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: var(--primary);
}

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

input:disabled + .toggle-slider {
  background-color: var(--primary);
  opacity: 0.6;
  cursor: not-allowed;
}

.always-on {
  font-size: 0.8rem;
  color: var(--secondary);
  font-style: italic;
}

.cookie-modal-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
  #cookie-banner {
    padding: 1rem;
  }

  .cookie-banner-buttons {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
  }

  .cookie-modal-content {
    padding: 1.5rem;
  }

  .cookie-modal-buttons {
    flex-direction: column;
  }
}
