/* ─────────────────────────────────────────
   WRAPPER
───────────────────────────────────────── */
.maradigma-boats-filters {
  margin: 0;
}

/* ─────────────────────────────────────────
   FILTER BAR (horizontal)
───────────────────────────────────────── */
.md-filterbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 10px;
  background: #fff;
  flex-wrap: wrap;
}

.md-filterbar__left,
.md-filterbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.md-filterbar__right {
  margin-left: auto;
}

/* ─────────────────────────────────────────
   DROPDOWNS
───────────────────────────────────────── */
.md-filter-dd {
  position: relative;
}

.md-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.md-filter-pill .md-caret {
  font-size: 12px;
  opacity: .7;
  transform: translateY(1px);
}

.md-filter-menu {
  position: absolute;
  z-index: 9999;
  top: 44px;
  left: 0;
  width: 360px;
  max-width: calc(100vw - 40px);
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  display: none;
}

.md-filter-menu.is-open {
  display: block;
}

.md-filter-menu__inner {
  padding: 14px 14px 10px;
}

.md-filter-menu__title {
  font-weight: 800;
  font-size: 14px;
  margin: 0 0 12px;
  color: #0b1220;
}

.md-filter-menu__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
}

.md-dd-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  background: rgba(2, 14, 45, .06);
  border-radius: 8px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}

.md-dd-clear .md-dd-icon {
  font-size: 14px;
  line-height: 1;
}

.md-dd-apply {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #1f2b3a;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  cursor: pointer;
}

/* ─────────────────────────────────────────
   BUTTONS: Reset / More filters / Apply (bar)
───────────────────────────────────────── */
.md-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1f2b3a;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  text-decoration: none;
}

.md-btn--ghost {
  background: #fff;
  color: #1f2b3a;
  border: 1px solid rgba(0, 0, 0, .12);
  font-weight: 800;
}

/* Botón FILTERS (offcanvas) */
.md-filterbar__more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #1f2b3a;
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
}

/* ─────────────────────────────────────────
   FIELD INTERNALS
───────────────────────────────────────── */
.maradigma-filter label,
.md-label {
  display: block;
  font-weight: 800;
  font-size: 13px;
  margin: 0 0 10px;
  color: #0b1220;
}

.maradigma-filter input[type="text"],
.maradigma-filter input[type="number"],
.maradigma-filter input[type="search"],
.maradigma-filter select,
.md-input,
.md-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 8px;
  padding: 10px 10px;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

.maradigma-filter input[type="text"]:focus,
.maradigma-filter input[type="number"]:focus,
.maradigma-filter input[type="search"]:focus,
.maradigma-filter select:focus,
.md-input:focus,
.md-select:focus {
  border-color: rgba(31, 43, 58, .35);
  box-shadow: 0 0 0 1px rgba(31, 43, 58, .12);
}

/* ─────────────────────────────────────────
   Select2
───────────────────────────────────────── */
.select2-container {
  width: 100% !important;
}

.select2-container .select2-selection--single {
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, .12) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  background: #fff !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 40px !important;
  padding-left: 10px !important;
  padding-right: 28px !important;
  color: #0b1220 !important;
}

.select2-container .select2-selection--single .select2-selection__placeholder {
  color: rgba(11, 18, 32, .55) !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  right: 8px !important;
}

.select2-container .select2-selection--multiple {
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, .12) !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 4px 6px !important;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

.select2-container .select2-search--inline .select2-search__field {
  margin-top: 0 !important;
  min-height: 28px;
}

.select2-dropdown {
  border: 1px solid rgba(0, 0, 0, .12) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.select2-results__option {
  padding: 10px 12px !important;
  font-size: 14px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: #1f2b3a !important;
  color: #fff !important;
}

.select2-container--open {
  z-index: 10050 !important;
}

/* Drawer + Select2 */
.md-drawer .select2-container {
  width: 100% !important;
}

.md-drawer .select2-dropdown {
  z-index: 10060 !important;
}

.md-drawer .select2-container--open {
  z-index: 10060 !important;
}

.md-drawer .select2-selection--single,
.md-drawer .select2-selection--multiple {
  width: 100% !important;
}

/* ─────────────────────────────────────────
   Stepper (Passengers)
───────────────────────────────────────── */
.md-stepper__label {
  font-weight: 800;
  font-size: 14px;
  margin: 0 0 12px;
  text-align: center;
}

.md-stepper__ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 0 8px;
}

.md-stepper__btn {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 0;
  background: rgba(0, 0, 0, .05);
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
}

.md-stepper__display {
  width: 52px;
  height: 38px;
  border-radius: 6px;
  border: 2px solid rgba(86, 193, 199, .75);
  text-align: center;
  font-weight: 900;
  font-size: 16px;
  outline: none;
  background: #fff;
}

/* ─────────────────────────────────────────
   Checkbox style
───────────────────────────────────────── */
.md-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #0b1220;
  user-select: none;
}

.md-check input {
  transform: translateY(1px);
}

/* ─────────────────────────────────────────
   Reutiliza tu slider (Price range)
───────────────────────────────────────── */
.maradigma-price-range {
  display: grid;
  gap: 10px;
}

.maradigma-price-range__slider {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
}

.maradigma-price-range__slider.ui-slider {
  height: 6px;
}

.maradigma-price-range__slider .ui-slider-range {
  background: rgba(0, 0, 0, 0.28);
}

.maradigma-price-range__slider .ui-slider-handle {
  top: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #fff;
  cursor: pointer;
}

.maradigma-price-range__values {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: .9;
}

/* noUiSlider compat */
.noUi-target {
  border: 0 !important;
  box-shadow: none !important;
  background: rgba(0, 0, 0, 0.12) !important;
}

.noUi-connect {
  background: rgba(31, 43, 58, .28) !important;
}

.noUi-handle {
  border: 1px solid rgba(0, 0, 0, .25) !important;
  box-shadow: none !important;
  border-radius: 50% !important;
}

.noUi-handle:before,
.noUi-handle:after {
  display: none !important;
}

/* datepicker z-index */
#ui-datepicker-div {
  z-index: 999999 !important;
}

/* ─────────────────────────────────────────
   Drawer (no Bootstrap)
───────────────────────────────────────── */
.md-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 9998;
}

.md-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 380px;
  max-width: 92vw;
  background: #fff;
  border-right: 1px solid rgba(0, 0, 0, .10);
  transform: translateX(-105%);
  transition: transform .18s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.md-drawer.is-open {
  transform: translateX(0);
}

.md-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.md-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, .10);
}

.md-drawer__title {
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

.md-drawer__close {
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.md-drawer__body {
  padding: 14px;
  overflow: auto;
  flex: 1 1 auto;
}

.md-drawer__grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.md-drawer__grid .md-field {
  width: 100%;
}

.md-drawer__grid .md-label {
  display: block;
  margin-bottom: 6px;
}

.md-drawer__grid .md-select,
.md-drawer__grid .md-input {
  width: 100%;
}

.md-drawer__footer {
  padding: 14px;
  border-top: 1px solid rgba(0, 0, 0, .10);
  background: #fff;
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 767px) {
  .md-filter-menu {
    width: 320px;
    max-width: calc(100vw - 24px);
  }

  .md-filterbar {
    align-items: stretch;
  }

  .md-filterbar__left,
  .md-filterbar__right {
    width: 100%;
  }

  .md-filterbar__right {
    margin-left: 0;
  }
}