/* =========================================================
   HSHGSH MAPS V10
========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family:
    Arial,
    "Noto Sans Arabic",
    sans-serif;
  background: #eef1f4;
}

button,
input {
  font-family: inherit;
}

#map {
  position: fixed;
  inset: 0;
  z-index: 1;
}


/* =========================================================
   SEARCH
========================================================= */

.search-shell {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 2000;
  max-width: 720px;
  margin: 0 auto;
}

.search-box {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;

  background: rgba(255,255,255,.97);

  border-radius: 18px;

  padding:
    0 8px
    0 15px;

  box-shadow:
    0 5px 24px rgba(0,0,0,.18);
}

.search-icon {
  font-size: 26px;
  color: #666;
  line-height: 1;
}

.search-box input {
  flex: 1;
  min-width: 0;

  height: 100%;

  border: 0;
  outline: 0;

  background: transparent;

  font-size: 17px;
  color: #151515;

  direction: rtl;
}

.search-box input::placeholder {
  color: #8a8a8a;
}

.search-box input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
}

.search-box
input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.search-btn {
  border: 0;
}

#searchBtn {
  height: 42px;

  border: 0;
  border-radius: 13px;

  padding:
    0 15px;

  background: #111;
  color: white;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
}

.clear-search {
  position: absolute;

  right: 62px;

  top: 50%;

  transform:
    translateY(-50%);

  z-index: 5;

  width: 30px;
  height: 30px;

  border: 0;
  border-radius: 50%;

  background: #eceff1;
  color: #555;

  font-size: 25px;
  line-height: 26px;

  padding: 0;

  cursor: pointer;
}

.hidden {
  display: none !important;
}


/* =========================================================
   SUGGESTIONS
========================================================= */

.suggestions {
  margin-top: 8px;

  background: rgba(255,255,255,.98);

  border-radius: 18px;

  overflow: hidden;

  box-shadow:
    0 10px 35px rgba(0,0,0,.20);

  max-height: 55vh;
  overflow-y: auto;
}

.suggestion-row {
  width: 100%;

  min-height: 62px;

  display: flex;
  align-items: center;

  gap: 12px;

  padding:
    10px 14px;

  border: 0;
  border-bottom:
    1px solid #eeeeee;

  background: white;

  text-align: right;

  cursor: pointer;
}

.suggestion-row:last-child {
  border-bottom: 0;
}

.suggestion-row:active {
  background: #f0f2f4;
}

.suggestion-icon {
  width: 43px;
  height: 43px;

  min-width: 43px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #f1f3f5;

  font-size: 20px;
}

.suggestion-text {
  flex: 1;
  min-width: 0;
}

.suggestion-text strong {
  display: block;

  color: #161616;

  font-size: 15px;
  font-weight: 800;
}

.suggestion-text small {
  display: block;

  margin-top: 4px;

  color: #777;

  font-size: 12px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-arrow {
  color: #999;
  font-size: 20px;
}

.nearby-title {
  padding:
    12px 15px 7px;

  color: #777;

  font-size: 12px;
  font-weight: 800;

  background: #fafafa;
}

.empty-suggestion,
.empty-result {
  padding: 24px;

  text-align: center;

  color: #777;
}


/* =========================================================
   RESULTS
========================================================= */

.results {
  position: fixed;

  top:
    calc(
      max(12px, env(safe-area-inset-top))
      + 64px
    );

  left: 12px;
  right: 12px;

  z-index: 1900;

  max-width: 720px;

  margin: 0 auto;

  max-height: 62vh;

  overflow-y: auto;

  background: white;

  border-radius: 18px;

  box-shadow:
    0 10px 35px rgba(0,0,0,.22);
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding:
    14px 16px;

  border-bottom:
    1px solid #eee;
}

.results-heading span {
  color: #777;
  font-size: 12px;
}

.result-row {
  width: 100%;

  display: flex;
  align-items: center;

  gap: 12px;

  min-height: 70px;

  padding:
    10px 15px;

  border: 0;
  border-bottom:
    1px solid #eee;

  background: white;

  text-align: right;

  cursor: pointer;
}

.result-icon {
  width: 43px;
  height: 43px;

  min-width: 43px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #f2f4f6;

  font-size: 20px;
}

.result-text {
  flex: 1;
  min-width: 0;
}

.result-text strong {
  display: block;

  font-size: 15px;
  font-weight: 800;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-text small {
  display: block;

  margin-top: 4px;

  color: #777;

  font-size: 12px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loading-box {
  padding: 25px;
  text-align: center;
  color: #666;
}


/* =========================================================
   LOCATION BUTTON
========================================================= */

.locate-button {
  position: fixed;

  right: 16px;

  bottom:
    calc(
      18px +
      env(safe-area-inset-bottom)
    );

  z-index: 1800;

  width: 56px;
  height: 56px;

  border: 0;
  border-radius: 50%;

  background: white;

  box-shadow:
    0 5px 22px rgba(0,0,0,.22);

  display: grid;
  place-items: center;

  cursor: pointer;
}

.locate-button span {
  font-size: 29px;
  color: #222;
}


/* =========================================================
   USER LOCATION
========================================================= */

.user-location-icon {
  background: transparent !important;
  border: 0 !important;
}

.user-dot {
  position: relative;

  width: 42px;
  height: 42px;
}

.user-core {
  position: absolute;

  left: 50%;
  top: 50%;

  width: 18px;
  height: 18px;

  transform:
    translate(-50%,-50%);

  border-radius: 50%;

  background: #1976ff;

  border:
    4px solid white;

  box-shadow:
    0 2px 8px rgba(0,0,0,.3);
}

.user-pulse {
  position: absolute;

  left: 50%;
  top: 50%;

  width: 38px;
  height: 38px;

  transform:
    translate(-50%,-50%);

  border-radius: 50%;

  background:
    rgba(25,118,255,.16);
}


/* =========================================================
   BOTTOM SHEET
========================================================= */

.bottom-sheet {
  position: fixed;

  left: 10px;
  right: 10px;

  bottom:
    calc(
      10px +
      env(safe-area-inset-bottom)
    );

  z-index: 2100;

  max-width: 600px;

  margin: 0 auto;

  background:
    rgba(255,255,255,.98);

  border-radius: 22px;

  box-shadow:
    0 10px 38px rgba(0,0,0,.25);

  overflow: hidden;
}


/* destination */

.destination-sheet {
  display: flex;

  align-items: center;

  gap: 12px;

  padding: 12px;
}

.destination-info {
  display: flex;

  align-items: center;

  gap: 10px;

  min-width: 0;

  flex: 1;
}

.destination-icon {
  width: 45px;
  height: 45px;

  min-width: 45px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #f0f2f4;

  font-size: 22px;
}

.destination-info strong {
  display: block;

  font-size: 15px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.destination-info small {
  display: block;

  margin-top: 4px;

  color: #777;

  font-size: 12px;
}

.navigate-button {
  border: 0;

  padding:
    13px 18px;

  border-radius: 14px;

  background: #111;
  color: white;

  font-size: 15px;
  font-weight: 900;

  white-space: nowrap;

  cursor: pointer;
}


/* routes */

.routes-sheet {
  padding: 9px;
}

.routes-header {
  display: flex;

  justify-content:
    space-between;

  align-items: center;

  padding:
    4px 7px 10px;
}

.routes-header strong {
  font-size: 15px;
}

.routes-header span {
  color: #777;

  font-size: 12px;
}

.route-option {
  width: 100%;

  min-height: 68px;

  display: flex;

  align-items: center;

  gap: 10px;

  border:
    2px solid transparent;

  border-radius: 16px;

  padding:
    7px 9px;

  margin-bottom: 7px;

  background: #f5f6f7;

  text-align: right;

  cursor: pointer;
}

.route-option:last-child {
  margin-bottom: 0;
}

.route-option.selected {
  background: #eef5ff;

  border-color:
    #1976ff;
}

.route-color {
  width: 7px;

  min-width: 7px;

  height: 51px;

  border-radius: 8px;
}

.route-option-main {
  flex: 1;

  display: grid;

  grid-template-columns:
    auto auto;

  align-items: center;

  column-gap: 12px;
}

.route-option-main strong {
  font-size: 19px;
}

.route-option-main span {
  font-size: 16px;
  font-weight: 700;
}

.route-option-main small {
  grid-column:
    1 / -1;

  color: #777;

  font-size: 12px;

  margin-top: 3px;
}

.route-check {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #1976ff;
  color: white;

  font-weight: 900;
}

.loading-route {
  padding: 20px;

  text-align: center;
}

.loading-route strong {
  display: block;

  font-size: 15px;
}

.loading-route small {
  display: block;

  margin-top: 6px;

  color: #777;
}

.loading-spinner {
  width: 25px;
  height: 25px;

  margin:
    0 auto 10px;

  border:
    3px solid #ddd;

  border-top-color:
    #1976ff;

  border-radius: 50%;

  animation:
    spin .7s linear infinite;
}

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


/* =========================================================
   ROUTE LABELS ON MAP
========================================================= */

.route-map-label-wrapper {
  background: transparent !important;
  border: 0 !important;
}

.route-map-label {
  min-width: 132px;

  height: 38px;

  padding:
    0 10px;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 7px;

  border-radius: 19px;

  background: white;

  color: #222;

  box-shadow:
    0 4px 16px rgba(0,0,0,.22);

  font-size: 13px;

  white-space: nowrap;

  transform:
    translateY(-3px);

  cursor: pointer;
}

.route-map-label strong {
  font-size: 14px;
}

.route-map-label.active {
  background: #1976ff;
  color: white;

  transform:
    translateY(-5px)
    scale(1.04);
}


/* =========================================================
   LOCATION MODAL
========================================================= */

.modal {
  position: fixed;

  inset: 0;

  z-index: 6000;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 20px;

  background:
    rgba(0,0,0,.48);
}

.modal-card {
  width: min(
    390px,
    100%
  );

  padding: 28px 22px;

  border-radius: 25px;

  background: white;

  text-align: center;

  box-shadow:
    0 18px 55px rgba(0,0,0,.3);
}

.modal-icon {
  font-size: 45px;
}

.modal-card h2 {
  margin:
    9px 0;
}

.modal-card p {
  color: #666;

  line-height: 1.7;

  margin:
    0 0 18px;
}

.primary-button,
.secondary-button {
  width: 100%;

  height: 50px;

  border: 0;

  border-radius: 14px;

  font-size: 15px;
  font-weight: 900;

  cursor: pointer;
}

.primary-button {
  background: #111;
  color: white;
}

.secondary-button {
  margin-top: 8px;

  background: #eef0f2;
  color: #333;
}


/* =========================================================
   TOAST
========================================================= */

.toast {
  position: fixed;

  top:
    calc(
      max(12px, env(safe-area-inset-top))
      + 70px
    );

  left: 50%;

  transform:
    translateX(-50%);

  z-index: 7000;

  max-width:
    calc(100% - 30px);

  padding:
    10px 16px;

  border-radius: 20px;

  background:
    rgba(0,0,0,.82);

  color: white;

  font-size: 13px;

  text-align: center;

  box-shadow:
    0 5px 20px rgba(0,0,0,.2);
}


/* =========================================================
   LEAFLET
========================================================= */

.leaflet-control-zoom {
  margin-bottom:
    85px !important;

  margin-right:
    8px !important;
}

.leaflet-control-zoom a {
  width: 42px !important;
  height: 42px !important;

  line-height: 40px !important;

  font-size: 22px !important;

  border: 0 !important;

  background: white !important;

  color: #222 !important;
}

.leaflet-control-zoom a:first-child {
  border-radius:
    13px 13px 0 0 !important;
}

.leaflet-control-zoom a:last-child {
  border-radius:
    0 0 13px 13px !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  .search-shell {
    left: 9px;
    right: 9px;
  }

  .search-box {
    height: 54px;

    border-radius: 17px;
  }

  #searchBtn {
    padding:
      0 13px;
  }

  .clear-search {
    right: 57px;
  }

  .bottom-sheet {
    left: 8px;
    right: 8px;

    border-radius: 21px;
  }

  .route-option {
    min-height: 64px;
  }

  .route-option-main strong {
    font-size: 18px;
  }

  .route-option-main span {
    font-size: 15px;
  }

  .navigate-button {
    padding:
      12px 15px;
  }

  .locate-button {
    right: 12px;

    bottom:
      calc(
        16px +
        env(safe-area-inset-bottom)
      );
  }
}
