/* proposal-location.css — Location combobox, breadcrumb, segments, chain steps.
   Plain CSS (not Tailwind) because this DOM is generated from JavaScript,
   which Tailwind's content scanner does not cover. */

.loc-combo-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 600;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,42,0.05);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.loc-combo-btn:hover { border-color: #cbd5e1; background: #fff; }
.loc-combo-btn:focus { outline: none; border-color: var(--pg-focus, #2563eb); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); background: #fff; }
.loc-combo-btn[data-empty="1"] .loc-combo-val { color: #94a3b8; font-weight: 500; }
.loc-combo-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-combo-chev { color: #9ca3af; font-size: 0.7rem; flex-shrink: 0; transition: transform 0.15s; }
.loc-combo-btn[aria-expanded="true"] .loc-combo-chev { transform: rotate(180deg); }

.loc-combo-pop {
  position: fixed;
  z-index: 90;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 18px 40px -12px rgba(15,23,42,0.28), 0 4px 12px -4px rgba(15,23,42,0.12);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.loc-combo-search {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.55rem 0.75rem;
  min-height: 40px;
  font-size: 0.875rem;
  color: #0f172a;
}
.loc-combo-search:focus { outline: none; border-color: var(--pg-focus, #2563eb); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); background: #fff; }
.loc-combo-meta {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0 0.25rem;
}
.loc-combo-list { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 1px; }
.loc-combo-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  color: #1f2937;
  cursor: pointer;
}
.loc-combo-opt:hover, .loc-combo-opt[data-active="1"] { background: #eef2ff; color: #3730a3; }
.loc-combo-opt[data-current="1"] { font-weight: 700; }
.loc-combo-opt .tick { margin-left: auto; color: #059669; font-size: 0.75rem; }
.loc-combo-custom {
  width: 100%;
  text-align: left;
  border: 1px dashed #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.loc-combo-custom:hover { background: #e0e7ff; }
.loc-combo-empty { padding: 0.75rem 0.625rem; font-size: 0.8125rem; color: #9ca3af; }

/* Authority tier segmented control */
.la-seg {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.6rem 0.25rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,42,0.05);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: center;
}
.la-seg:hover { border-color: var(--pg-focus, #2563eb); background: #fff; }
.la-seg:focus { outline: none; border-color: var(--pg-focus, #2563eb); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); }
.la-seg .la-code { display: block; font-size: 0.9375rem; font-weight: 800; letter-spacing: 0.04em; color: #0f172a; }
.la-seg .la-sub { display: block; font-size: 0.625rem; font-weight: 600; color: #94a3b8; margin-top: 1px; }
.la-seg[data-selected="1"] { border-color: var(--pg-focus, #2563eb); background: #eff6ff; box-shadow: 0 0 0 4px rgba(37,99,235,0.12); }
.la-seg[data-selected="1"] .la-code { color: #1d4ed8; }
.la-seg[data-selected="1"] .la-sub { color: #3b82f6; }

/* Breadcrumb chips */
.loc-bc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  border: 1px solid;
  max-width: 100%;
}
.loc-bc-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-bc-civil { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.loc-bc-rda { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.loc-bc-lg { background: #fffbeb; color: #b45309; border-color: #fde68a; }

/* RDA chain connectors between step fields */
.loc-chain { position: relative; }
@media (min-width: 640px) {
  .loc-chain-link::after {
    content: "›";
    position: absolute;
    right: -0.85rem;
    top: 2.1rem;
    color: #6ee7b7;
    font-weight: 800;
    font-size: 1rem;
    z-index: 1;
  }
  .loc-chain-link:last-child::after { content: none; }
}

.loc-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.75rem;
}
.loc-group-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #fff;
}
.loc-group-num.civil { background: #6366f1; }
.loc-group-num.rda { background: #059669; }
.loc-group-num.lg { background: #d97706; }
.loc-group-hint { margin-left: auto; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: #b6bcc7; }
.loc-field-hint { font-size: 0.6875rem; color: #b6bcc7; margin-top: 0.25rem; }
