/* Modern Delivery & Map System - RJK Homemade Foods */
.location-check {
  padding: 16px 20px;
  border: 1px solid rgba(35, 61, 40, 0.18);
  border-radius: 16px;
  background: #f4f7f2;
  transition: all 0.25s ease;
}
.location-check b {
  display: block;
  font-size: 18px;
  color: #1b3320;
}
.location-check p {
  margin: 6px 0 12px;
  color: #4b554d;
  line-height: 1.45;
}
.location-check.eligible {
  background: #eaf6ec;
  border-color: #52a460;
  box-shadow: 0 4px 14px rgba(82, 164, 96, 0.12);
}
.location-check.ineligible {
  background: #fff1f0;
  border-color: #e06c64;
  box-shadow: 0 4px 14px rgba(224, 108, 100, 0.12);
}

.location-button,
.map-search button {
  border: 0;
  border-radius: 11px;
  padding: 12px 18px;
  background: #233d28;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.location-button:hover,
.map-search button:hover {
  background: #172b1b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(23, 43, 27, 0.18);
}

.location-dialog {
  width: min(920px, calc(100% - 24px));
  padding: 28px;
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  box-sizing: border-box;
}
.location-dialog::backdrop {
  background: rgba(12, 22, 15, 0.7);
  backdrop-filter: blur(6px);
}
.location-head h2 {
  font: 36px Georgia, serif;
  margin: 6px 0 10px;
  color: #18281a;
}
.location-head p {
  margin: 0 0 14px;
  color: #59655b;
}

.delivery-radius-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #e6f3e8;
  color: #1e632b;
  border: 1px solid rgba(46, 125, 50, 0.25);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.map-search-container {
  position: relative;
  margin: 14px 0 16px;
  z-index: 1000;
}
.map-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrapper .search-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  opacity: 0.6;
  pointer-events: none;
}
.search-input-wrapper input {
  width: 100%;
  padding: 13px 40px 13px 42px;
  border: 1.5px solid rgba(35, 61, 40, 0.25);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  background: #fdfdfd;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input-wrapper input:focus {
  outline: none;
  border-color: #233d28;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(35, 61, 40, 0.12);
}
.search-input-wrapper .clear-search {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 15px;
  color: #777;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
}
.search-input-wrapper .clear-search:hover {
  background: #eee;
  color: #111;
}

/* Autocomplete suggestions dropdown */
.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(35, 61, 40, 0.18);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  z-index: 2000;
  list-style: none;
  padding: 6px;
  margin: 0;
}
.suggestion-item {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #233d28;
  transition: background 0.15s ease;
}
.suggestion-item:hover,
.suggestion-item.highlighted {
  background: #eef5ef;
}
.suggestion-item .pin-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.suggestion-item .sugg-content {
  flex: 1;
}
.suggestion-item .sugg-name {
  font-weight: 700;
  color: #172719;
  display: block;
}
.suggestion-item .sugg-sub {
  font-size: 12px;
  color: #637064;
  display: block;
  margin-top: 2px;
}

#deliveryMap {
  height: 420px;
  border-radius: 18px;
  background: #e6ebe4;
  overflow: hidden;
  border: 1px solid rgba(35, 61, 40, 0.12);
  z-index: 10;
}

/* Result Box */
.location-result {
  margin: 14px 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: #f2f4f0;
  border: 1px solid rgba(35, 61, 40, 0.1);
  transition: all 0.25s ease;
}
.location-result.good {
  background: #eaf6ec;
  border-color: #52a460;
  color: #134e23;
}
.location-result.bad {
  background: #fff1f0;
  border-color: #e06c64;
  color: #8b231c;
}
.location-result .res-header {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.location-result .res-address {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}
.location-result .res-meta {
  font-size: 13px;
  font-weight: 700;
}
.location-result .res-meta span {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

.location-dialog > #confirmLocation {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 800;
  border-radius: 12px;
  margin-top: 6px;
}
.location-dialog > #confirmLocation:disabled,
[data-final-order]:disabled,
[data-final-subscription]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 680px) {
  .location-dialog {
    padding: 18px 16px;
  }
  .map-search {
    grid-template-columns: 1fr;
  }
  .location-head h2 {
    font-size: 28px;
  }
  #deliveryMap {
    height: 330px;
  }
}
