/*
 * InspectorClub public header fallback
 * Keeps Login / Join dropdowns and authentication modals usable even when
 * legacy Bootstrap rules load late or are overridden by homepage styles.
 */

/* Header dropdown controls */
.dropdown12 {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.dropdown12 > .dropbtn12 {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 14px !important;
  border-radius: 5px;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
}

.dropdown12 > .btn_join {
  color: #fff !important;
  background: #0e77b8 !important;
  border: 2px solid #0e77b8 !important;
}

.dropdown12 > .btn_join:hover,
.dropdown12 > .btn_join:focus {
  color: #fff !important;
  background: #0b659d !important;
  border-color: #0b659d !important;
}

.dropdown12 > .dropdown-content12 {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10000;
  display: none;
  min-width: 190px;
  padding: 7px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(8, 43, 68, 0.18);
}

.dropdown12:hover > .dropdown-content12,
.dropdown12:focus-within > .dropdown-content12 {
  display: block;
}

.dropdown12 > .dropdown-content12 > a.db {
  display: block;
  padding: 10px 12px;
  color: #17324d !important;
  background: transparent;
  border-radius: 5px;
  text-decoration: none !important;
}

.dropdown12 > .dropdown-content12 > a.db:hover,
.dropdown12 > .dropdown-content12 > a.db:focus {
  color: #0b659d !important;
  background: #eef7fc;
}

/*
 * Authentication modal safeguard.
 * These blocks must never participate in normal document flow.
 * Bootstrap adds .show (v4) or .in (v3) only when a modal is opened.
 */
#register-modal.modal,
#login-modal.modal,
#forgot-modal.modal {
  position: fixed !important;
  inset: 0;
  z-index: 1050;
  display: none !important;
  overflow: hidden;
  outline: 0;
}

#register-modal.modal.show,
#login-modal.modal.show,
#forgot-modal.modal.show,
#register-modal.modal.in,
#login-modal.modal.in,
#forgot-modal.modal.in {
  display: block !important;
  overflow-x: hidden;
  overflow-y: auto;
}

#register-modal .modal-dialog,
#login-modal .modal-dialog,
#forgot-modal .modal-dialog {
  position: relative;
  width: auto;
  max-width: 540px;
  margin: 30px auto;
  pointer-events: none;
}

#register-modal .modal-content,
#login-modal .modal-content,
#forgot-modal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(8, 43, 68, 0.16);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(8, 43, 68, 0.24);
  outline: 0;
}

@media (max-width: 767px) {
  .dropdown12 > .dropdown-content12 {
    right: auto;
    left: 0;
  }

  #register-modal .modal-dialog,
  #login-modal .modal-dialog,
  #forgot-modal .modal-dialog {
    margin: 12px;
  }
}
