#sliding-popup {
  width: fit-content;
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 20px;
  bottom: 24px !important;
  font-size: 14px;
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #0d47a1;
}

#sliding-popup .popup-content {
  max-width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#popup-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: unset !important;
}

#popup-text {
  color: #4c4c4c !important;
  font-weight: 300;
  max-width: unset !important;
}

.eu-cookie-withdraw-button {
  display: none;
}

#sliding-popup .eu-cookie-compliance-default-button {
  border: 1px solid #0d47a1;
  padding: 10px 20px;
  width: 9em;
}


.agree-button {
  color: #fff !important;
  background-color: #0d47a1 !important;
}

.eu-cookie-compliance-reject-button {
  background: 0 0;
  color: #0d47a1;
}

.find-more-button {
  background: none;
  border: none;
  color: #0066cc;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  font-weight: 300;
  text-align: left;
}

#popup-text p {
  display: inline;
  margin-right: 2px;
}


@media (max-width: 1100px) {
  #sliding-popup .popup-content {
    flex-direction: column;
    align-items: center;

  }
}

@media screen and (min-width: 1100px) and (max-width: 1350px) {
  #popup-buttons {
    flex-direction: column;
  }

  #popup-text {
    margin-top: auto;
    margin-bottom: auto;
    justify-items: center;
    align-items: center;
    justify-content: center;
  }
}



/* --- Cookie Settings Modal Styles --- */

/* Modal Overlay */
#cookie-modal-overlay {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Sit on top of the page content */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  /* Semi-transparent black */
  z-index: 9998;
  /* Below modal, above everything else */
}

/* Modal Container */
#cookie-settings-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Center the modal */
  background-color: #fff;
  padding: 25px 30px;
  border: 1px solid #ccc;
  /* MODIFICATION: Remove rounded corners */
  border-radius: 0;
  /* Changed from 8px to 0 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  /* Above overlay */
  min-width: 300px;
  /* Minimum width */
  max-width: 600px;
  /* Maximum width (restored original or adjust as needed) */
  width: 90%;
  /* Responsive width */
  /* REMOVED: aspect-ratio: 1 / 1; */
  /* RESTORED: Limit height */
  max-height: 80vh;
  overflow-y: auto;
  /* Add scroll if content overflows */
}

/* Modal Header (Optional but good practice) */
.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 20px;
  /* Increased margin */
  font-size: 16px;
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.2em;
  color: #333;
}

/* Modal Close Button */
#cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.8em;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  padding: 0 5px;
}

#cookie-modal-close:hover {
  color: #333;
}

/* Modal Body - where categories will go */
.cookie-modal-body {
  /* Styles for the content area if needed */
  margin-bottom: 20px;
  /* Space before save button */
}

/* Ensure categories content displays correctly inside modal */
#cookie-settings-modal #eu-cookie-compliance-categories {
  display: block !important;
  /* Override any inline styles or other rules */
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* --- Category Styling Modifications --- */

/* Container for each category */
#cookie-settings-modal .eu-cookie-compliance-category {
  margin-bottom: 18px;
  /* ADDED: Space between categories */
  padding-bottom: 10px;
  /* ADDED: Space before potential border */
  border-bottom: 1px solid #f0f0f0;
  /* ADDED: Subtle separator */
}

#cookie-settings-modal .eu-cookie-compliance-category:last-child {
  border-bottom: none;
  /* Remove border for the last item */
}

/* Flex container for checkbox and label */
#cookie-settings-modal .eu-cookie-compliance-category>div:first-child {
  display: flex;
  justify-content: space-between;
  /* Push label and checkbox apart */
  align-items: center;
  /* Vertically align label and checkbox */
  width: 100%;
  margin-bottom: 5px;
  /* ADDED: Space between title/checkbox line and description */
}

/* Category Title (Label) Styling */
#cookie-settings-modal .eu-cookie-compliance-category label {
  font-weight: bold;
  /* MODIFICATION: Make title bold */
  color: #333;
  /* Ensure good contrast */
  order: 1;
  /* MODIFICATION: Ensure label appears first visually */
  margin-right: 10px;
  /* Space between text and checkbox if they were adjacent */
  cursor: pointer;
  /* Make it clear it's clickable */
  font-size: 15px;
}

/* Make disabled labels look slightly different */
#cookie-settings-modal .eu-cookie-compliance-category input[disabled]+label {
  color: #777;
  cursor: default;
}


/* Checkbox Styling */
#cookie-settings-modal .eu-cookie-compliance-category input[type="checkbox"] {
  order: 2;
  /* MODIFICATION: Ensure checkbox appears second (right side) */
  /* Optional: Make checkbox slightly larger */
  transform: scale(1.1);
  margin: 0;
  /* Reset margin */
  cursor: pointer;
}

#cookie-settings-modal .eu-cookie-compliance-category input[type="checkbox"][disabled] {
  cursor: default;
  opacity: 0.7;
}


/* Category Description Styling */
#cookie-settings-modal .eu-cookie-compliance-category-description {
  font-size: 0.9em;
  /* MODIFICATION: Slightly smaller font */
  color: #555;
  /* MODIFICATION: Lighter color than title */
  padding-left: 0;
  /* Ensure it aligns left under the label */
  line-height: 1.4;
  /* Improve readability */
}

/* --- End Category Styling Modifications --- */


/* Style the Save button inside the modal */
#cookie-settings-modal .eu-cookie-compliance-save-preferences-button {
  /* Make it look like other primary buttons */
  border: 1px solid #0d47a1;
  padding: 10px 20px;
  color: #fff !important;
  background-color: #0d47a1 !important;
  cursor: pointer;
  display: block;
  /* Make it block level */
  width: 100%;
  /* Full width */
  text-align: center;
  margin-top: 15px;
  /* Space above */
  box-sizing: border-box;
  /* Include padding/border in width */
}

#cookie-settings-modal .eu-cookie-compliance-save-preferences-button:hover {
  opacity: 0.9;
}

/* Hide the original categories section */
#eu-cookie-compliance-categories {
  display: none;
  /* Keep it hidden in its original location */
}

/* Style for the dynamically added Settings button in the banner */
.cookie-settings-trigger-button {
  background: 0 0;
  color: #0d47a1;
  border: 1px solid #0d47a1;
  padding: 10px 20px;
  width: 9em;
  /* Match other buttons */
  order: -1;
  /* Try to place it first */
  cursor: pointer;
}

#sliding-popup .eu-cookie-compliance-default-button.agree-button:hover {
  background-color: #1565c0 !important; /* Немного светлее основной цвет */
  border-color: #1565c0 !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Стиль при наведении на кнопку Отклонить */
#sliding-popup .eu-cookie-compliance-reject-button:hover {
  background-color: rgba(13, 71, 161, 0.08) !important; /* Легкая подложка */
  transition: background-color 0.2s ease;
}

/* Стиль при наведении на кнопку Настройки */
#sliding-popup .cookie-settings-trigger-button:hover {
  background-color: rgba(13, 71, 161, 0.08) !important; /* Такой же как у Отклонить */
  transition: background-color 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .cookie-settings-trigger-button {
    width: auto;
    /* Override fixed width */
    text-align: center;
    order: 0;
    /* Adjust order for column layout */
  }

  /* Ensure other buttons follow */
  #popup-buttons .eu-cookie-compliance-reject-button {
    order: 1;
  }

  #popup-buttons .agree-button {
    order: 2;
  }
}

/* Adjust modal padding and max-width on smaller screens */
@media (max-width: 600px) {
  #cookie-settings-modal {
    width: 90%;
    padding: 20px;
    max-width: 90%;
    /* Allow it to take more screen width */
    /* Aspect ratio still applies */
  }
}


/* Class added to body when modal is open to prevent background scroll */
body.cookie-modal-open {
  overflow: hidden;
}