/* ===============================
   Otani Dealer Locator — mockup match
================================ */
#custom-otani-dealer-locator,
#custom-otani-dealer-locator * {
  box-sizing: border-box;
}

#custom-otani-dealer-locator {
  width: 100%;
  background: #ffffff;
  color: #231f20;
  font-family: "Metropolis", sans-serif;
  padding: 8px 0 48px;
}

/* Shared content shell — keeps filter + list/map edges aligned */
.custom-otani-dealer-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===============================
   Filter Bar
================================ */
.custom-otani-dealer-filter-wrap {
  background: #ffffff;
  padding: 20px 0 20px;
}

.custom-otani-dealer-filter-bar {
  display: flex;
  gap: 14px;
  align-items: stretch;
  width: 100%;
}

.custom-otani-dealer-filter-bar select {
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  padding-inline-end: 42px;
  border-radius: 2px;
  border: 1px solid #d0d5dd;
  font-family: "Metropolis", sans-serif;
  font-size: 15px;
  line-height: 48px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  color: #667085;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-align: start;
}

.custom-otani-dealer-filter-bar select:focus {
  outline: none;
  border-color: #005aab;
  color: #231f20;
}

.custom-otani-dealer-filter-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: stretch;
}

.custom-otani-dealer-filter-btn {
  flex: 0 0 auto;
}

.custom-otani-dealer-filter-btn button,
.custom-otani-dealer-filter-btn--reset a {
  font-family: "Metropolis", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 26px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border-radius: 2px;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.custom-otani-dealer-filter-btn button {
  background: #ed1c24;
  color: #fff;
  border: none;
}

.custom-otani-dealer-filter-btn button:hover {
  background: #005aab;
}

/* Matches Otani site Reset control: blue outline */
.custom-otani-dealer-filter-btn--reset a {
  background: #fff;
  color: #005aab;
  border: 1.5px solid #005aab;
}

.custom-otani-dealer-filter-btn--reset a:hover {
  background: #005aab;
  color: #fff;
  border-color: #005aab;
}

/* ===============================
   Layout — list ~38% / map ~62%
================================ */
.custom-otani-dealer-inner {
  display: flex;
  align-items: stretch;
  height: 620px;
  width: 100%;
  background: #ffffff;
  overflow: hidden;
  border-top: 1px solid #e8ebf0;
}

/* ===============================
   Distributor List
================================ */
.custom-otani-dealer-results {
  width: 38%;
  min-width: 320px;
  background: #ffffff;
  overflow-y: auto;
  border-inline-end: 1px solid #e8ebf0;
}

.custom-otani-dealer-empty {
  padding: 28px 24px;
  color: #667085;
  font-size: 15px;
}

.custom-otani-dealer-card {
  padding: 22px 24px 24px;
  border-bottom: 1px solid #eef1f5;
  cursor: pointer;
  transition: background 0.2s ease;
}

.custom-otani-dealer-card:last-child {
  border-bottom: none;
}

.custom-otani-dealer-card:hover {
  background: #fafbfc;
}

.custom-otani-dealer-card.active {
  background: #fff8f8;
  box-shadow: inset 3px 0 0 #ed1c24;
}

html[dir="rtl"] .custom-otani-dealer-card.active,
.otani-rtl .custom-otani-dealer-card.active {
  box-shadow: inset -3px 0 0 #ed1c24;
}

/* Soft red badge — matches mockup tag */
.custom-otani-dealer-badge {
  display: inline-block;
  background: #fde8e9;
  color: #ed1c24;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.custom-otani-dealer-name {
  font-size: 17px;
  font-weight: 700;
  color: #231f20;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* Street line — blue link */
.custom-otani-dealer-address {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 2px;
  color: #005aab;
}

.custom-otani-dealer-address a {
  color: #005aab;
  text-decoration: none;
  font-weight: 500;
}

.custom-otani-dealer-address a:hover {
  text-decoration: underline;
}

/* City / country — darker second line */
.custom-otani-dealer-location {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 12px;
  color: #231f20;
  font-weight: 500;
}

.custom-otani-dealer-phones {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
}

.custom-otani-dealer-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 0;
  color: #005aab;
}

.custom-otani-dealer-phone-icon {
  display: inline-flex;
  color: #005aab;
  flex-shrink: 0;
}

.custom-otani-dealer-phone a {
  color: #005aab;
  text-decoration: none;
  font-weight: 500;
}

.custom-otani-dealer-phone a:hover {
  text-decoration: underline;
}

.custom-otani-dealer-direction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  background: #ed1c24;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.custom-otani-dealer-direction:hover {
  background: #005aab;
  color: #ffffff !important;
}

/* ===============================
   Map
================================ */
#custom-otani-dealer-map {
  width: 62%;
  height: 100%;
  background: #eef2f6;
}

.custom-otani-map-pin {
  background: transparent;
  border: 0;
}

.custom-otani-map-pin-dot {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 50% 50% 50% 0;
  background: #005aab;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 90, 171, 0.35);
  position: relative;
}

.custom-otani-map-pin-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #ffffff;
}

/* ===============================
   Leaflet Popup
================================ */
.leaflet-popup-content {
  color: #231f20;
  margin: 14px 16px !important;
}

.custom-otani-dealer-map-popup {
  min-width: 260px;
  font-family: "Metropolis", sans-serif;
}

.custom-otani-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.custom-otani-popup-title {
  font-size: 15px;
  font-weight: 700;
  color: #231f20;
  text-transform: uppercase;
}

.custom-otani-popup-tag {
  display: inline-flex;
  align-items: center;
  background: #fde8e9;
  color: #ed1c24;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.custom-otani-popup-row {
  font-size: 13px;
  color: #005aab;
  margin-bottom: 8px;
  line-height: 1.5;
}

.custom-otani-popup-row a {
  color: #005aab;
  text-decoration: none;
}

.custom-otani-popup-row a:hover {
  text-decoration: underline;
}

.custom-otani-popup-actions {
  margin-top: 12px;
}

.custom-otani-popup-direction {
  display: inline-flex;
  align-items: center;
  background: #ed1c24;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 8px 14px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.custom-otani-popup-direction:hover {
  background: #005aab;
  color: #ffffff !important;
}

/* ===============================
   Meta + Pagination
================================ */
.custom-otani-dealer-meta {
  font-size: 13px;
  color: #667085;
  margin: 0 0 12px;
}

.custom-otani-dealer-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.custom-otani-dealer-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  background: #ed1c24;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.custom-otani-dealer-page-link:hover {
  background: #005aab;
  color: #fff !important;
}

.custom-otani-dealer-page-status {
  font-size: 13px;
  color: #667085;
}

/* ===============================
   Scrollbar
================================ */
.custom-otani-dealer-results::-webkit-scrollbar {
  width: 6px;
}

.custom-otani-dealer-results::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

/* ===============================
   Mobile
================================ */
@media (max-width: 900px) {
  .custom-otani-dealer-shell {
    padding: 0 16px;
  }

  .custom-otani-dealer-filter-bar {
    flex-direction: column;
    gap: 12px;
  }

  .custom-otani-dealer-filter-actions {
    flex-direction: column;
    width: 100%;
  }

  .custom-otani-dealer-filter-btn button,
  .custom-otani-dealer-filter-btn--reset a {
    width: 100%;
  }

  .custom-otani-dealer-inner {
    flex-direction: column;
    height: auto;
  }

  .custom-otani-dealer-results,
  #custom-otani-dealer-map {
    width: 100%;
    min-width: 0;
    height: 420px;
  }

  .custom-otani-dealer-results {
    border-inline-end: 0;
    border-bottom: 1px solid #e8ebf0;
  }
}

/* ===============================
   RTL (GTranslate / WordPress dir=rtl)
   Note: with dir=rtl, flex/grid already mirror —
   do NOT force row-reverse (that double-flips back to LTR).
================================ */
html[dir="rtl"] #custom-otani-dealer-locator,
.otani-rtl #custom-otani-dealer-locator {
  direction: rtl;
  text-align: start;
}

html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-filter-bar select,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-filter-bar select {
  background-position: left 16px center;
  text-align: start;
}

html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-name,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-name,
html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-address,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-address,
html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-location,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-location,
html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-meta,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-meta,
html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-badge,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-badge,
html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-popup-title,
.otani-rtl #custom-otani-dealer-locator .custom-otani-popup-title {
  text-align: start;
}

html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-phone a,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-phone a,
html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-popup-row a,
.otani-rtl #custom-otani-dealer-locator .custom-otani-popup-row a {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-dealer-direction,
.otani-rtl #custom-otani-dealer-locator .custom-otani-dealer-direction,
html[dir="rtl"] #custom-otani-dealer-locator .custom-otani-popup-direction,
.otani-rtl #custom-otani-dealer-locator .custom-otani-popup-direction {
  text-align: center;
}

html[dir="rtl"] #custom-otani-dealer-locator .leaflet-left,
.otani-rtl #custom-otani-dealer-locator .leaflet-left {
  left: auto;
  right: 0;
}

html[dir="rtl"] #custom-otani-dealer-locator .leaflet-right,
.otani-rtl #custom-otani-dealer-locator .leaflet-right {
  right: auto;
  left: 0;
}

html[dir="rtl"] #custom-otani-dealer-locator .leaflet-left .leaflet-control,
.otani-rtl #custom-otani-dealer-locator .leaflet-left .leaflet-control {
  margin-left: 0;
  margin-right: 10px;
}

html[dir="rtl"] #custom-otani-dealer-locator .leaflet-right .leaflet-control,
.otani-rtl #custom-otani-dealer-locator .leaflet-right .leaflet-control {
  margin-right: 0;
  margin-left: 10px;
}
