/* ==================================================
 GLOBAL RESET
 ================================================== */

html, body {
  margin: 0 !important;
  padding: 0 !important;
}

.cmplz-manage-link,
.cmplz-manage-consent,
.cmplz-show-manage-consent {
  display: none;
}

/* ==================================================
 COOKIE BANNER — bottom bar only
 ================================================== */

.cmplz-cookiebanner:not(#robnety-preferences-modal) {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: unset !important;
  transform: none !important;
  width: 100vw !important;
  max-width: 100vw !important;
  z-index: 9999 !important;
  box-shadow: 0 -2px 10px rgba(0,0,0,.1) !important;
  border-radius: 0 !important;
  padding: 15px 30px !important;
  box-sizing: border-box !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 15px !important;
}

/*.cmplz-cookiebanner:not(#robnety-preferences-modal):not(.cmplz-hidden) {*/
/*  display: flex */
/*}*/
.cmplz-cookiebanner:not(#robnety-preferences-modal):not(.cmplz-hidden) {
  display: flex;
}

.cmplz-cookiebanner.cmplz-dismissed {
    display: none !important;
}

/*div.cmplz-cookiebanner.cmplz-dismissed,*/
/*div.cmplz-cookiebanner.cmplz-hidden {*/
/*  display: none !important;*/
/*}*/

.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-header,
.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-divider,
.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-categories {
  display: none;
}

.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-message {
  flex: 1 1 100% !important;
  min-width: 100% !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  order: 1 !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}

/* Banner button row */
.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons {
  display: flex;
  width: 100% !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 16px !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
  order: 2 !important;
}

/* Banner buttons — strip browser defaults, Complianz inline styles still apply */
/*.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .cmplz-btn {*/
/*  all: unset !important;*/
/*  display: inline-flex !important;*/
/*  justify-content: center !important;*/
/*  align-items: center !important;*/
/*  padding: 12px 16px !important;*/
/*  cursor: pointer !important;*/
/*  text-align: center !important;*/
/*  box-sizing: border-box !important;*/
/*  flex: 0 0 auto !important;*/
/*}*/

.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .cmplz-btn {
    all: unset;
    width: 40%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    flex: 0 0 auto;
    background-color: var(--cmplz_button_accept_background_color);
    border: 1px solid var(--cmplz_button_accept_border_color);
    color: var(--cmplz_button_accept_text_color);
    border-radius: var(--cmplz_button_border_radius);
    font-size: var(--cmplz_button_font_size);
}

/* View preferences — text link on left */
.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .robnety-view-preferences {
  all: unset !important;
  display: inline-flex;
  align-items: center !important;
  background: none !important;
  border: none !important;
  color: inherit !important;
  text-decoration: underline !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  opacity: 0.75 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  margin-right: auto !important;
  order: 1 !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* Accept button sizing */
.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .cmplz-accept {
  order: 2 !important;
  min-width: 150px !important;
}

/* Hide save-preferences and hidden view-preferences in banner */
.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .cmplz-save-preferences,
.cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .cmplz-view-preferences {
  display: none;
}

/* ==================================================
 MODAL OVERLAY
 ================================================== */

#robnety-preferences-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  background: rgba(0,0,0,.5) !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  padding: 0 !important;
  gap: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  transform: none !important;
  bottom: unset !important;
  top: 0 !important;
}

#robnety-preferences-modal:not(.cmplz-hidden),
#robnety-preferences-modal.cmplz-active {
  display: flex !important;
}

/* Modal content box */
#robnety-preferences-modal .cmplz-modal-content {
  background: white !important;
  padding: 24px !important;
  border-radius: 8px !important;
  max-width: 600px !important;
  width: 90% !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.2) !important;
  box-sizing: border-box !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 100000 !important;
  flex: none !important;
}

#robnety-preferences-modal .cmplz-close-modal {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  font-size: 24px !important;
  cursor: pointer !important;
}

#robnety-preferences-modal .cmplz-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  text-align: left !important;
}

#robnety-preferences-modal .cmplz-message {
  min-width: 0 !important;
  flex: none !important;
  order: unset !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  white-space: normal !important;
  max-width: 100% !important;
  line-height: 1.5 !important;
  margin-bottom: 10px !important;
}

/* Modal buttons row */
#robnety-preferences-modal .cmplz-buttons {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 20px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  order: unset !important;
  padding: 0 !important;
  align-items: center !important;
  align-content: center !important;
}

/* Modal buttons — reset banner bleeds, Complianz provides colors */
#robnety-preferences-modal .cmplz-buttons .cmplz-btn {
  flex: 1 1 auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 80px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

/* Force save-preferences visible in modal */
#robnety-preferences-modal .cmplz-buttons .cmplz-save-preferences {
  display: inline-flex !important;
}

/* ==================================================
 CATEGORY STYLES (modal)
 ================================================== */

.cmplz-categories-modal { margin: 20px 0 !important; }
.cmplz-category { margin-bottom: 15px !important; padding: 15px !important; border: 1px solid #eee !important; border-radius: 6px !important; }
.cmplz-category-header { display: flex !important; justify-content: space-between !important; align-items: center !important; margin-bottom: 10px !important; }
.cmplz-category-title { font-weight: 600 !important; font-size: 16px !important; }
.cmplz-description { font-size: 0.9em !important; color: #666 !important; }
.cmplz-category input[type="checkbox"] { width: 20px !important; height: 20px !important; margin-right: 10px !important; }

/* ==================================================
 RESPONSIVE
 ================================================== */

@media (max-width: 768px) {
  .cmplz-cookiebanner:not(#robnety-preferences-modal) {
    padding: 15px !important;
    overflow-x: hidden !important;
  }

  .cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .cmplz-btn {
    width: 100% !important;
    min-width: auto !important;
    white-space: normal !important;
  }

  .cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-buttons .robnety-view-preferences {
    padding: 7px 0 !important;
    width: 100% !important;
  }

  .cmplz-cookiebanner:not(#robnety-preferences-modal) .cmplz-message {
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
    white-space: normal !important;
  }

  #robnety-preferences-modal .cmplz-modal-content {
    width: 95% !important;
    padding: 20px !important;
  }

  #robnety-preferences-modal .cmplz-buttons {
    flex-direction: column !important;
  }

  #robnety-preferences-modal .cmplz-buttons .cmplz-btn {
    width: 100% !important;
  }
}