/* Cookie Consent Banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--white, #ffffff);
  border-top: 1px solid var(--grey-03, #e5e5e5);
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

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

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-banner-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-text {
  flex: 1;
}

.cookie-text h3 {
  font-family: var(--ff-sans-medium);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.cookie-text p {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--grey-13);
  margin: 0;
}

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

.cookie-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--ff-sans-medium);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.cookie-btn-primary {
  background-color: var(--black, #000);
  color: var(--white, #fff);
}

.cookie-btn-primary:hover {
  background-color: var(--grey-13, #333);
}

.cookie-btn-secondary {
  background-color: transparent;
  border-color: var(--grey-04, #ccc);
  color: var(--black, #000);
}

.cookie-btn-secondary:hover {
  border-color: var(--black, #000);
  background-color: var(--grey-01, #f9f9f9);
}

.cookie-btn-text {
  background: none;
  border: none;
  text-decoration: underline;
  color: var(--grey-13);
  padding: 0.5rem;
}

.cookie-btn-text:hover {
  color: var(--black, #000);
}

/* Cookie Preference Modal */
#cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#cookie-modal-overlay.visible {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

#cookie-modal {
  background-color: var(--white, #fff);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 10px 90px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cookie-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--grey-03, #e5e5e5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h2 {
  font-family: var(--ff-sans-medium);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 500;
  margin: 0;
}

.cookie-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--grey-13);
  padding: 0.5rem;
  line-height: 1;
}

.cookie-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

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

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

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

.category-header h4 {
  font-family: var(--ff-sans-medium);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 500;
  margin: 0;
}

.category-desc {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--grey-13);
  margin: 0;
}

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

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--grey-11);
  transition: 0.4s;
  border-radius: 24px;
}

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

input:checked + .slider {
  background-color: var(--black, #000);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

input:disabled + .slider {
  background-color: var(--grey-07);
  cursor: not-allowed;
}

.cookie-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--grey-03, #e5e5e5);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  background-color: var(--grey-01, #f9f9f9);
}
