/* ================================================================
   RTAPI – Scoped Bootstrap 3 components
   All rules prefixed with .rtapi-wrapper to prevent The7/Elementor
   conflicts. Bootstrap JS is NOT loaded; modal open/close is handled
   in search.js.
   ================================================================ */

.rtapi-wrapper {
  margin: 0 !important;
}

/* Box sizing */
.rtapi-wrapper *,
.rtapi-wrapper *::before,
.rtapi-wrapper *::after {
  box-sizing: border-box;
}

/* ---- Grid ---- */
.rtapi-wrapper .row {
  margin-right: 0;
  margin-left: -15px;
}
.rtapi-wrapper .row::before,
.rtapi-wrapper .row::after {
  display: table;
  content: "";
}
.rtapi-wrapper .row::after {
  clear: both;
}

.rtapi-wrapper [class*="col-"] {
  position: relative;
  min-height: 1px;
  padding-right: 0 !important;
  padding-left: 15px;
  width: 100%;
}

@media (min-width: 992px) {
  .rtapi-wrapper .col-md-2  { float: left; width: 16.66667%; }
  .rtapi-wrapper .col-md-5  { float: left; width: 41.66667%; }
  .rtapi-wrapper .col-md-7  { float: left; width: 58.33333%; }
  .rtapi-wrapper .col-md-12 { float: left; width: 100%; }
}

/* ---- HR ---- */
.rtapi-wrapper hr {
  margin-top: 40px;
  margin-bottom: 40px;
  border: 0;
  border-top: 1px solid #eee;
}

/* ---- Forms ---- */
.rtapi-wrapper .form-group {
  margin-bottom: 15px;
}
.rtapi-wrapper .form-control {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857;
  color: #555;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.rtapi-wrapper .form-control:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}
.rtapi-wrapper select.form-control {
  height: 34px;
}

/* ---- Buttons ---- */
.rtapi-wrapper .btn {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.42857;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}
.rtapi-wrapper .btn:hover,
.rtapi-wrapper .btn:focus {
  text-decoration: none;
  outline: 0;
}
.rtapi-wrapper .btn-primary,
#result_modal .btn-primary {
  padding: 10px 15px !important;
	background-color: #0057b8 !important;
	font-size: 16px !important;
	border-radius: 40px !important;
	color: #fff !important;
	border: 1px solid #0057b8 !important;
}
.rtapi-wrapper .btn-primary:hover,
.rtapi-wrapper .btn-primary:focus,
#result_modal .btn-primary:hover,
#result_modal .btn-primary:focus {
  color: #0057b8 !important;
  background-color: #fff !important;
  border-color: #0057b8 !important;
}
.rtapi-wrapper .btn-info {
  color: #fff;
  background-color: #5bc0de;
  border-color: #46b8da;
}
.rtapi-wrapper .btn-info:hover,
.rtapi-wrapper .btn-info:focus {
  color: #fff;
  background-color: #31b0d5;
  border-color: #269abc;
}

/* ---- Table ---- */
.rtapi-wrapper .table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  border-collapse: collapse;
  background-color: transparent;
}
.rtapi-wrapper .table > tbody > tr > td {
  padding: 8px;
  line-height: 1.42857;
  vertical-align: top;
  border-top: 1px solid #ddd;
}

/* ---- Alert ---- */
.rtapi-wrapper .alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.rtapi-wrapper .alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

/* ---- List Group ---- */
.rtapi-wrapper .list-group {
  padding-left: 0;
  margin-bottom: 20px;
}
.rtapi-wrapper .list-group-item {
  position: relative;
  display: block;
  padding: 10px 15px;
  margin-bottom: -1px;
  background-color: #fff;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #555;
}
.rtapi-wrapper .list-group-item:first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}
.rtapi-wrapper .list-group-item:last-child {
  margin-bottom: 0;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
}
.rtapi-wrapper .list-group-item:hover,
.rtapi-wrapper .list-group-item:focus {
  color: #555;
  background-color: #f5f5f5;
  text-decoration: none;
}
.rtapi-wrapper .list-group-item h4 {
  margin: 0;
  font-size: 18px;
}

/* ---- Badge ---- */
.rtapi-wrapper .badge {
  display: inline-block;
  min-width: 10px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  background-color: #777;
  border-radius: 10px;
  margin-right: 8px;
}

/* ---- Utilities ---- */
.rtapi-wrapper .text-right { text-align: right; }
.rtapi-wrapper .hidden     { display: none !important; }
.rtapi-wrapper .img-fluid  { max-width: 100%; height: auto; }

/* ---- Misc ---- */
.rtapi-wrapper #search_results_count {
	float: right;
}
.rtapi-wrapper #search_form {
	background: #fafafa;
	border-radius: 4px;
	border: 1px solid #ddd;
	padding: 20px;
}
.rtapi-wrapper #search_form label {
  margin-bottom: 3px;
  display: block;
}
.rtapi-wrapper h1 {
  margin-bottom: 40px;
}
.rtapi-wrapper #search_results {
  margin-top: 30px;
}
.rtapi-wrapper [dir="rtl"]  .list-group-item {
  flex-direction: row-reverse;
}

/* ---- Modal ---- */
/*
 * The modal is moved to <body> by search.js on load to avoid Elementor's
 * transform stacking context breaking position:fixed. We therefore scope
 * modal rules to #result_modal directly rather than .rtapi-wrapper.
 */
#result_modal {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99999;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.5);
  outline: 0;
}
#result_modal .modal-dialog {
  position: relative;
  width: auto;
  margin: 10px;
  transform: translate(0, -25%);
  transition: transform 0.3s ease-out;
}
#result_modal.is-open .modal-dialog {
  transform: translate(0, 0);
}
@media (min-width: 768px) {
  #result_modal .modal-dialog { width: 600px; margin: 30px auto; }
  #result_modal .modal-lg     { width: 900px; }
}
#result_modal .modal-content {
  position: relative;
  outline: 0;
}
#result_modal .modal-content-wrapper {
  padding-top: 0 !important;
}
#result_modal .modal-header::after {
  display: table;
  content: "";
  clear: both;
}
#result_modal .modal-title {
  margin: 0;
  line-height: 1.42857;
  font-size: 18px;
}
#result_modal .modal-body {
  position: relative;
  padding: 15px;
  background: #fff;
  background-color: #fff;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0,0,0,.5);
}
#result_modal #modal_body {
  line-height: 1.4285714 !important;
  font-size: 16px !important;
}
#result_modal .close {
  float: right;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
}
#result_modal .close:hover,
#result_modal .close:focus {
  opacity: 0.8;
  text-decoration: none;
}
#result_modal .modal-title {
  font-size: 30px;
}
#result_modal .modal-body hr {
	margin: 10px 0;
  border: 0;
	border-top: 1px solid #eee;
}
#result_modal .modal-body ul {
  list-style: disc;
	margin: 0 0 10px 20px;
}
#result_modal .modal-body ol {
  list-style: initial;
	margin: 0 0 10px 20px;
}
#result_modal .modal-body [class*="col-"] { 
  padding: 0 !important;
}
#result_modal abbr[title] {
  border: 0;
}
#result_modal .modal-body h1,
#result_modal .modal-body h2,
#result_modal .modal-body h3,
#result_modal .modal-body h4,
#result_modal .modal-body h5,
#result_modal .modal-body h6 {
  margin-top: 20px;
	margin-bottom: 10px;
}
#result_modal button {
  margin-top: 30px;
}