/* Location Selector Modal
   Drop this file into your site and link it after your base stylesheet. */

.loc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 25, 0.55);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.loc-modal-overlay.is-open {
  display: flex;
}

.loc-modal {
  width: 100%;
  max-width: 560px;
  max-height: min(640px, 88vh);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(20, 12, 60, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: loc-modal-in 0.18s ease-out;
}

@keyframes loc-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.loc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 4px;
}

.loc-modal__title-group {
  display: flex;
  gap: 12px;
}

.loc-modal__pin {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #EEF0FF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B3FE4;
}

.loc-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #14142B;
}

.loc-modal__subtitle {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: #6B6B80;
}

.loc-modal__close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #F2F2F6;
  color: #4A4A5A;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.loc-modal__close:hover {
  background: #E4E4EC;
}

.loc-modal__search-wrap {
  padding: 16px 24px 0;
}

.loc-modal__search {
  position: relative;
}

.loc-modal__search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9494A6;
}

.loc-modal__search input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px 11px 40px;
  border-radius: 10px;
  border: 1px solid #E2E2EA;
  background: #FAFAFC;
  font-size: 14.5px;
  color: #14142B;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.loc-modal__search input:focus {
  border-color: #4B3FE4;
  background: #ffffff;
}

.loc-modal__body {
  padding: 18px 24px 24px;
  overflow-y: auto;
}

.loc-modal__section-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #8C8C9E;
  margin: 0 0 10px;
}

.loc-modal__popular {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(91px, 1fr));
  gap: 10px;
}

.loc-modal__popular a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid #ECECF2;
  border-radius: 12px;
  text-decoration: none;
  color: #26263B;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.loc-modal__popular a:hover {
  border-color: #4B3FE4;
  background: #F7F7FF;
}

.loc-modal__popular svg {
  color: #4B3FE4;
}

.loc-modal__other {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #F0F0F4;
}

.loc-modal__other li {
  border-bottom: 1px solid #F0F0F4;
}

.loc-modal__other a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  text-decoration: none;
  color: #26263B;
  font-size: 14.5px;
  transition: color 0.15s ease;
}

.loc-modal__other a:hover {
  color: #4B3FE4;
}

.loc-modal__empty,
.loc-modal__error {
  padding: 18px 4px;
  font-size: 13.5px;
  color: #9494A6;
}

@media (max-width: 480px) {
  .loc-modal__popular {
    grid-template-columns: repeat(3, 1fr);
  }
}
