/* geocode-manager.css — Location Geocoder admin page */

/* ── Page layout: header stays from admin.css, body is two-panel ──────────── */
body.admin-page.geocode-page {
    overflow: hidden;
}

.geocode-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 52px); /* subtract admin header */
}

/* ── Left panel — places table ───────────────────────────────────────────────── */
.geocode-left {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
}

.geocode-left-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.geocode-search-input {
    flex: 1;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}
.geocode-search-input:focus { border-color: #3b82d4; }

.geocode-filter-btns {
    display: flex;
    gap: 4px;
}

.geocode-filter-btn {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f0f2f5;
    color: #57606a;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.geocode-filter-btn.active,
.geocode-filter-btn:hover {
    background: #1e1e2e;
    color: #fff;
    border-color: #1e1e2e;
}

.geocode-table-wrap {
    flex: 1;
    overflow-y: auto;
}

.geocode-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.geocode-table th {
    position: sticky;
    top: 0;
    background: #f7f8fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 7px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #57606a;
    white-space: nowrap;
    z-index: 1;
}

.geocode-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.geocode-table tr { cursor: pointer; transition: background 0.1s; }
.geocode-table tr:hover td { background: #f7f8fa; }
.geocode-table tr.selected td { background: #eff6ff; }
.geocode-table tr.selected td:first-child { border-left: 3px solid #3b82d4; }

.geo-badge {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.geo-badge--yes { background: #16a34a; }
.geo-badge--no  { background: #d1d5db; }

.geocode-count {
    font-size: 11px;
    color: #57606a;
    padding: 6px 14px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* ── Right panel — map + edit form ───────────────────────────────────────────── */
.geocode-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f7f8fa;
}

/* Edit form bar (above map) */
.geocode-edit-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 18px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.geocode-edit-bar.hidden { display: none; }

.geocode-edit-bar h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1f2328;
    margin: 0;
}

.geocode-fields-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.geocode-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.geocode-field label {
    font-size: 11px;
    font-weight: 600;
    color: #57606a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.geocode-field input {
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #1f2328;
}
.geocode-field input:focus { border-color: #3b82d4; }
.geocode-field input[readonly] { background: #f7f8fa; color: #57606a; }

.geocode-field--name    { flex: 2; min-width: 160px; }
.geocode-field--state   { flex: 1.5; min-width: 120px; }
.geocode-field--district{ flex: 1.5; min-width: 120px; }
.geocode-field--post    { flex: 1.5; min-width: 120px; }
.geocode-field--pincode { width: 90px; }
.geocode-field--country { width: 80px; }
.geocode-field--coord   { width: 110px; }

.geocode-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.geocode-hint {
    font-size: 11.5px;
    color: #57606a;
    margin-left: auto;
}

/* Map */
#geocode-map {
    flex: 1;
    min-height: 0;
}

/* Empty state overlay */
.geocode-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #57606a;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}
.geocode-empty-state span:first-child { font-size: 32px; }
