.osm-route-planner {
  width: 100%;
  max-width: 100%;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 30px;
  box-sizing: border-box;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  --osm-destination-logo-size: 50px;
  --osm-map-min-height: 465px;
  --osm-map-route-height: 518px;
  --osm-external-confirm-bg: #03af95;
  --osm-external-confirm-border: #03af95;
  --osm-external-confirm-color: #ffffff;
  --osm-external-confirm-hover-bg: #02967f;
  --osm-external-confirm-hover-border: #02967f;
  --osm-external-confirm-hover-color: #ffffff;
  --osm-external-cancel-bg: #fdecec;
  --osm-external-cancel-border: #f2b8b8;
  --osm-external-cancel-color: #8f1d1d;
  --osm-external-cancel-hover-bg: #f7d2d2;
  --osm-external-cancel-hover-border: #e89a9a;
  --osm-external-cancel-hover-color: #7a1515;
}

.osm-route-planner *,
.osm-route-planner *::before,
.osm-route-planner *::after {
  box-sizing: border-box;
}

.osm-route-main-area {
  min-width: 0;
  width: 100%;
}

.osm-route-planner.has-mobile-transfer .osm-route-main-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 20px;
  align-items: start;
}

.osm-route-main-area .osm-route-mobile {
  align-self: start;
  margin-top: 0;
}

.osm-route-calc-box {
  padding: 20px;
  border-radius: 10px;
  background: #f8f6f0;
}

.osm-route-eyebrow {
  margin: 0 0 8px;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  padding-left: 5px;
}

.osm-route-title {
  margin: 0;
  color: #000;
  line-height: 1.08;
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
  padding-left: 5px;
}

.osm-route-subtitle {
  margin: 12px 0 10px;
  color: #000;
  font-size: 12px;
  line-height: 1.55;
  padding-left: 5px;
}

.osm-route-form label {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.osm-route-input-wrap {
  display: grid;
  gap: 10px;
  width: 100%;
}

.osm-route-input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.osm-route-input-wrap input:focus {
  border-color: #1f6feb;
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.osm-route-input-wrap button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: #1f6feb;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.osm-route-input-wrap button:hover,
.osm-route-input-wrap button:focus {
  background: #185abc;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(31, 111, 235, 0.32);
}

.osm-route-input-wrap button:disabled {
  cursor: wait;
  opacity: 0.85;
  transform: none;
}

.osm-button-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: osmSpin 0.8s linear infinite;
}

.osm-route-planner.is-loading .osm-button-loader {
  display: inline-block;
}

@keyframes osmSpin {
  to {
    transform: rotate(360deg);
  }
}

.osm-route-destination {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 18px;
  padding: 15px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  font-size: 14px;
  line-height: 1.45;
}

.osm-route-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: #fd044a;
  box-shadow: 0 0 0 5px rgba(253, 4, 74, 0.12);
}

.osm-route-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.osm-route-result[hidden] {
  display: none;
}

.osm-route-result > div {
  padding: 5px 0px 5px 15px;
  border-radius: 6px;
  background: #fff;
  border: 0px solid rgba(148, 163, 184, 0.25);
}

.osm-route-result strong {
  color: #000;
  font-size: 14px;
}

.osm-route-message {
  margin-top: 10px;
  min-height: 22px;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.osm-route-message.is-error {
  color: #b00020;
}

.osm-route-message.is-success {
  color: #146c2e;
  font-weight: 600;
  text-align: center;
}

.osm-route-map-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: var(--osm-map-min-height);
  border-radius: 10px;
  overflow: hidden;
}

.osm-map {
  width: 100%;
  height: 100%;
  min-height: var(--osm-map-min-height);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 14px;
}

.osm-custom-marker span {
  display: block;
  width: 25px;
  height: 25px;
  margin: 4px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.osm-destination-marker span {
  background: #fd044a;
}

.osm-start-marker span {
  background: #16a34a;
}

.osm-destination-logo-marker {
  width: var(--osm-destination-logo-size) !important;
  height: var(--osm-destination-logo-size) !important;
  margin-left: calc(var(--osm-destination-logo-size) / -2) !important;
  margin-top: calc(var(--osm-destination-logo-size) * -1) !important;
  background: transparent;
  border: 0;
}

.osm-destination-logo-marker span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--osm-destination-logo-size);
  height: var(--osm-destination-logo-size);
  margin: 0;
  padding: 8px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  overflow: hidden;
  box-shadow: none;
}

.osm-destination-logo-marker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.osm-destination-logo-marker em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  font-style: normal;
  text-align: center;
}

@media (max-width: 1180px) {
  .osm-route-planner.has-mobile-transfer .osm-route-main-area {
    grid-template-columns: 1fr;
  }

  .osm-route-main-area .osm-route-map-wrap {
    order: 1;
  }

  .osm-route-main-area .osm-route-mobile {
    order: 2;
    margin-top: 10px;
  }
}

@media (max-width: 900px) {
  .osm-route-planner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .osm-route-map-wrap,
  .osm-map {
    min-height: var(--osm-map-min-height);
  }
}

@media (max-width: 560px) {
  .osm-route-panel-content {
    padding: 0px;
  }

  .osm-route-result {
    grid-template-columns: 1fr;
  }

  .osm-route-map-wrap,
  .osm-map {
    min-height: var(--osm-map-min-height);
    border-radius: 18px;
  }
}

.osm-route-planner.has-mobile-transfer .osm-route-map-wrap,
.osm-route-planner.has-mobile-transfer .osm-map {
  min-height: var(--osm-map-route-height);
}

.osm-route-directions {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 18px;
  padding: 0px;
}

.osm-route-directions[hidden] {
  display: none;
}

.osm-route-directions h3 {
  margin: 0 0 20px;
  color: #000;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.osm-route-directions-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 0px;
  list-style: none;
  counter-reset: osmDirections;
}

.osm-route-directions-list li {
  counter-increment: osmDirections;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  line-height: 1.45;
}

.osm-route-direction-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #bfa86c;
  color: #000;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  speak: none;
}

.osm-route-direction-icon::before {
  display: block;
  line-height: 1;
}

.osm-route-direction-content {
  display: block;
  min-width: 0;
}

.osm-route-direction-text {
  display: block;
  font-weight: 700;
}

.osm-route-directions-list li small {
  display: block;
  margin-top: 4px;
  color: #000;
  font-size: 13px;
  font-weight: 600;
}

.osm-route-directions-list li.is-start .osm-route-direction-icon {
  background: #16a34a;
}

.osm-route-directions-list li.is-arrive .osm-route-direction-icon {
  background: #fd044a;
}

.osm-route-directions-list li.is-left .osm-route-direction-icon,
.osm-route-directions-list li.is-right .osm-route-direction-icon,
.osm-route-directions-list li.is-slight-left .osm-route-direction-icon,
.osm-route-directions-list li.is-slight-right .osm-route-direction-icon,
.osm-route-directions-list li.is-sharp-left .osm-route-direction-icon,
.osm-route-directions-list li.is-sharp-right .osm-route-direction-icon {
  background: #f4f4f4;
}

.osm-route-directions-list li.is-straight .osm-route-direction-icon {
  background: #bfa86c;
}

.osm-route-directions-list li.is-uturn .osm-route-direction-icon {
  background: #f4f4f4;
}

.osm-route-directions-list li.is-roundabout .osm-route-direction-icon {
  background: #f4f4f4;
}

.osm-route-directions-list li.is-ramp-right .osm-route-direction-icon {
  background: #0f766e;
}

.osm-route-fields {
  display: grid;
  gap: 12px;
}

.osm-route-field label {
  display: block;
  margin-bottom: 8px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  padding-left: 5px;
}

.osm-route-field input {
  width: 100%;
  min-width: 0;
  padding: 15px 15px;
  border: 0px solid #fff;
  border-radius: 7px;
  background: #fff;
  color: #000;
  font-size: 14px;
  outline: none;
}

.osm-route-field input:focus {
  border-color: #f4f4f4;
  box-shadow: 0 0 0 1px rgba(3, 182, 64, 0.43);
}

.osm-route-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  padding: 14px 18px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: #9e1519;
}

.osm-route-submit:hover,
.osm-route-submit:focus {
  background: #03af95;
}

.osm-route-submit:disabled {
  cursor: wait;
  opacity: 0.85;
  transform: none;
}

.osm-route-mobile {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 20px;
  border-radius: 10px;
  background: #f8f6f0;
}

.osm-route-mobile[hidden] {
  display: none !important;
}

.osm-route-mobile h3 {
  margin: 0 0 10px 0;
  color: #000;
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
}

.osm-route-mobile p {
  margin: 0 0 14px 0;
  color: #000;
  font-size: 13px;
  line-height: 1.45;
}

.osm-route-mobile-content {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.osm-route-mobile-qr {
  flex: 0 0 auto;
}

.osm-route-mobile-qr img {
  display: block;
  width: 100px;
  height: 100px;
  max-width: 100%;
  border: 0px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
}

.osm-route-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 100%;
  text-align: center;
}

.osm-route-mobile-links a,
.osm-route-mobile-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #bfa86c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
  border: 0px solid rgb(191, 168, 108);
}

.osm-route-mobile-links a i,
.osm-route-mobile-links button i {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
}

.osm-route-mobile-links a .fa-whatsapp {
  font-size: 16px;
}

.osm-route-mobile-links a span,
.osm-route-mobile-links button span {
  display: inline-block;
}

.osm-route-mobile-links a:hover,
.osm-route-mobile-links a:focus,
.osm-route-mobile-links button:hover,
.osm-route-mobile-links button:focus {
  background: #03af95;
  border: 1px solid #03af95;
  color: #fff;
}
.osm-route-mobile-links button[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .osm-route-directions-list li {
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 12px 14px;
  }

  .osm-route-direction-icon {
    width: 40px;
    height: 40px;
    font-size: 21px;
  }

  .osm-route-planner {
    --osm-destination-logo-size: 58px;
  }
}

@media print {
  .osm-route-print-button,
  .osm-route-mobile {
    display: none !important;
  }
}

input:hover:not([type="submit"]), button:hover:not([type="submit"]), textarea:hover {
  border: 0px solid rgb(153,153,153);
}

html.osm-external-modal-open,
html.osm-external-modal-open body {
  overflow: hidden;
}

.osm-external-modal[hidden] {
  display: none !important;
}

.osm-external-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.osm-external-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.osm-external-modal-box {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 24px;
  border-radius: 10px;
  background: #ffffff;
  color: #000000;
}

.osm-external-modal-box h3 {
  margin: 0 0 10px 0;
  color: #000000;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  text-transform: none;
}

.osm-external-modal-box p {
  margin: 0 0 18px 0;
  color: #000000;
  font-size: 14px;
  line-height: 1.5;
}

.osm-external-modal-box strong {
  color: #000000;
  font-weight: 700;
}

.osm-external-modal-box p strong {
  display: inline;
}

.osm-external-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.osm-external-modal-actions button,
.osm-external-modal-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.osm-external-modal-cancel {
  border: 1px solid var(--osm-external-cancel-border);
  background: var(--osm-external-cancel-bg);
  color: var(--osm-external-cancel-color);
}

.osm-external-modal-confirm {
  border: 1px solid var(--osm-external-confirm-border);
  background: var(--osm-external-confirm-bg);
  color: var(--osm-external-confirm-color);
}

.osm-external-modal-cancel:hover,
.osm-external-modal-cancel:focus {
  border-color: var(--osm-external-cancel-hover-border);
  background: var(--osm-external-cancel-hover-bg);
  color: var(--osm-external-cancel-hover-color);
}

.osm-external-modal-confirm:hover,
.osm-external-modal-confirm:focus {
  border-color: var(--osm-external-confirm-hover-border);
  background: var(--osm-external-confirm-hover-bg);
  color: var(--osm-external-confirm-hover-color);
}

@media (max-width: 560px) {
  .osm-external-modal {
    align-items: flex-end;
    padding: 14px;
  }

  .osm-external-modal-box {
    width: 100%;
    padding: 20px;
  }

  .osm-external-modal-actions {
    grid-template-columns: 1fr;
  }
}
