/* Location Selector Drawer & Modal Styles */
.loc-modal-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1260;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.loc-modal-sheet {
  pointer-events: auto;
}

@media (min-width: 640px) {
  .loc-modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.loc-modal-sheet {
  background: var(--surface, #ffffff);
  color: var(--ink, #1e2022);
  width: 100%;
  max-width: 520px;
  min-height: 280px;
  max-height: 85vh;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}

@media (min-width: 640px) {
  .loc-modal-sheet {
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    min-height: 320px;
  }
}

.loc-sheet-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.loc-sheet-title {
  margin: 0;
  font-family: var(--display, 'Instrument Sans', sans-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.loc-close-btn {
  background: var(--surface-raised, #f1f5f9);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.18s ease;
}

.loc-close-btn:hover {
  background: var(--line-strong);
  color: var(--ink);
}

.loc-sheet-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Location Card in List */
.loc-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.loc-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.loc-card.selected {
  border-color: var(--ink);
  background: var(--surface-raised);
}

.loc-card-radio {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.loc-card.selected .loc-card-radio {
  border-color: var(--ink);
}

.loc-card.selected .loc-card-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

.loc-card-info {
  flex: 1;
}

.loc-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.loc-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.loc-card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.loc-card-phone {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.loc-card-addr {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.45;
}

.loc-card-notes {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
}

/* Empty / Login prompt states */
.loc-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}

.loc-empty-state svg {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.loc-empty-state h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.loc-empty-state p {
  font-size: 13.5px;
  margin: 0 0 18px;
}

/* Add / Manage Buttons */
.loc-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 14px;
  border: 1.5px dashed var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
}

.loc-add-btn:hover {
  border-color: var(--ink);
  background: var(--surface-raised);
}

/* New Address Form inside Sheet */
.loc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loc-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.loc-input, .loc-select {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 500 14px var(--body, sans-serif);
  outline: none;
  transition: border-color 0.18s ease;
  width: 100%;
  box-sizing: border-box;
}

.loc-input:focus, .loc-select:focus {
  border-color: var(--ink);
}

.loc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.loc-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .loc-grid-3 {
    grid-template-columns: 1fr;
  }
}

.loc-btn-primary {
  padding: 13px 20px;
  background: var(--ink);
  color: var(--surface);
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.loc-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.loc-btn-secondary {
  padding: 12px 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
