.cookie-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #252935;
  color: #ffffff;
  padding: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.cookie-popup-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-popup-content p {
  font-size: 0.75rem;
  line-height: 1.5;
  margin-bottom: 12px;
  padding-bottom: 0;
}

.cookie-popup-content a {
  color: #00a8a3;
  text-decoration: underline;
}

/* Button styles */
.cookie-popup-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  width: 100%;
  flex: 0.2;
}

.cookie-button {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-left: 8px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.cookie-button:hover,
.cookie-button:focus {
  background-color: rgba(255, 255, 255, 0.1);
  outline: none;
}

/* Responsive styles for cookie popup */
@media (max-width: 768px) {
  .cookie-popup-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .cookie-popup-content p {
    margin-bottom: 8px; /* Reduced margin for mobile */
  }

  .cookie-popup-buttons {
    flex-direction: column;
    align-items: stretch;
    margin-top: 12px;
  }

  .cookie-button {
    margin-left: 0;
    margin-bottom: 8px;
    width: 100%;
  }

  .cookie-button:last-child {
    margin-bottom: 0;
  }
}

/* Additional adjustments for very small screens */
@media (max-width: 480px) {
  .cookie-popup {
    padding: 12px;
  }

  .cookie-popup-content p {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }

  .cookie-button {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Privacy Settings Modal */
.privacy-settings-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.privacy-settings-modal-content {
  position: relative;
  background-color: #ffffff;
  margin: 20px auto;
  padding: 1rem;
  border: 1px solid #888;
  width: 95%;
  max-width: 800px;
  height: auto;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
}

.privacy-settings-modal-content .privacy-settings-title {
  border-bottom: 1px solid #e5e5e5;
  margin: 0 -1rem;
  padding: 0 1rem 16px;
}

/* Modal Title */
.privacy-settings-modal-content h2 {
  font-weight: bold;
  font-size: 24px;
  margin-bottom: 0;
}

/* Main Content Wrapper */
.main-content {
  display: flex;
  flex-direction: column;
  padding: 0;
  height: auto;
  overflow-y: auto;
}

/* Sidebar Styles */
.sidebar {
  flex: 1;
  padding-right: 0;
  margin-bottom: 16px;
}

.sidebar ol {
  list-style: none;
  padding: 0;
}

.sidebar ol li {
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
  font-weight: 500;
  font-size: 1rem;
}

.sidebar ol li a {
  color: #252935;
  text-decoration: none;
  font-weight: 500;
}

.sidebar ol li a:hover {
  text-decoration: underline;
}

.sidebar button {
  width: 100%;
}

/* Legal Content Styles */
.legal-content {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h3 {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: bold;
}

.modal-section p {
  font-size: 16px;
  line-height: 1.5;
  color: #252935;
  margin-bottom: 8px;
}

.modal-section a {
  color: #00a8a3;
  text-decoration: underline;
}

/* Toggle Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  margin-left: 12px;
}

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

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

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

input:checked + .slider {
  background-color: #000;
}

input:focus + .slider {
  box-shadow: 0 0 1px #000;
}

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

/* Button styles for modal */
#confirm-choices-btn,
#confirm-choices-btn-mobile {
  border: 1px solid #252935;
  color: #252935;
  margin: 0;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
}

#confirm-choices-btn:hover,
#confirm-choices-btn:focus,
#confirm-choices-btn-mobile:hover,
#confirm-choices-btn-mobile:focus {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Close button */
.privacy-settings-x-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #252935;
  background: none;
  border: none;
  cursor: pointer;
}

.privacy-settings-x-close:hover,
.privacy-settings-x-close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive Adjustments */
@media (min-width: 640px) {
  .privacy-settings-modal-content {
    margin: 50px auto;
    height: 45.5rem;
  }

  .main-content {
    flex-direction: row;
    padding: 8px;
    height: inherit;
    overflow-y: auto;
  }

  .sidebar {
    flex: 1.5;
    padding-right: 24px;
    margin-bottom: 0;
  }

  .legal-content {
    flex: 3;
    padding: 1rem 1rem 1.5rem;
    overflow-y: auto;
  }
}

.button-box-mobile {
  display: none;
  padding-top: 16px;
}

.button-box-mobile .cookie-button {
  width: 100%;
  margin-bottom: 8px;
}

@media (max-width: 639px) {
  .privacy-settings-modal-content {
    padding: 0.5rem;
  }

  .privacy-settings-modal-content .privacy-settings-title {
    margin: 0 -0.5rem;
    padding: 0 0.5rem 16px;
    border-bottom: none; /* Remove bottom border on mobile */
  }

  .privacy-settings-modal-content h2 {
    font-size: 20px;
  }

  .main-content {
    margin-bottom: 4rem;
  }

  .sidebar ol li {
    padding: 0.75rem 0;
    font-size: 0.9rem;
  }

  .modal-section h3 {
    font-size: 18px;
  }

  .modal-section p {
    font-size: 14px;
  }

  /* Hide the usual confirm choices button */
  #confirm-choices-btn {
    display: none;
  }

  .privacy-settings-x-close {
    top: 3%; /* Center vertically */
    transform: translateY(-50%); /* Adjust for exact centering */
  }

  .button-box-mobile {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #252935; /* Same as cookie popup */
    padding: 1.25rem 1rem;
  }

  #confirm-choices-btn-mobile {
    width: 100%;
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 9999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
  }

  #confirm-choices-btn-mobile:hover,
  #confirm-choices-btn-mobile:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
  }

  .cookie-popup-content {
    text-align: center;
  }

  .cookie-popup-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cookie-button {
    margin: 8px 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .privacy-settings-modal-content {
    width: 100%;
    margin: 0;
    border-radius: 0;
    height: 100vh;
  }
}
