/* public/admin/styles/places.css
   Places Manager — Section C
   Builds on admin.css.
*/

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.pl-tabs {
    display: flex;
    background: #fff;
    border-bottom: 2px solid #e5e7eb;
    flex-shrink: 0;
    padding: 0 24px;
}
.pl-tab {
    padding: 11px 20px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: #57606a;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.pl-tab:hover  { color: #1f2328; }
.pl-tab.active { color: #3b82d4; border-bottom-color: #3b82d4; font-weight: 600; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.pl-main  { overflow-y: auto; padding: 20px 28px; }
.pl-panel { display: none; }
.pl-panel.active { display: block; }

/* ── Toolbar ──────────────────────────────────────────────────────────────── */
.pl-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.pl-input {
    padding: 7px 11px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
    outline: none;
    min-width: 180px;
}
.pl-input:focus { border-color: #3b82d4; }
.pl-input-sm { min-width: 90px; width: 90px; }
.pl-select {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}
.pl-label { font-size: 13px; color: #57606a; white-space: nowrap; }
.pl-hint  { font-size: 13px; color: #57606a; flex: 1; }
.pl-check-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #1f2328; cursor: pointer; user-select: none;
}

/* ── Loading ──────────────────────────────────────────────────────────────── */
.pl-loading {
    display: flex; align-items: center; gap: 10px;
    padding: 28px 0; color: #57606a; font-size: 13px;
}
.pl-spinner {
    width: 20px; height: 20px;
    border: 3px solid #e5e7eb; border-top-color: #3b82d4;
    border-radius: 50%;
    animation: pl-spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }

.pl-empty { color: #16a34a; font-weight: 500; font-size: 13px; padding: 20px 0; }
.pl-count { font-size: 12px; color: #57606a; margin-bottom: 10px; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.pl-table {
    width: 100%; border-collapse: collapse; font-size: 12.5px;
    margin-bottom: 20px;
}
.pl-table th {
    text-align: left; padding: 6px 10px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em;
    color: #57606a; background: #f7f8fa; white-space: nowrap;
}
.pl-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f1f3;
    vertical-align: middle;
}
.pl-table tr:last-child td { border-bottom: none; }
.pl-table tr:hover td { background: #fafbfc; }
.pl-row-inactive td { opacity: 0.55; }

.pl-edit-btn { font-size: 11px; padding: 3px 9px; }
.pl-geo-yes { color: #16a34a; font-size: 12px; }
.pl-geo-no  { color: #8b949e; font-size: 12px; }

.pl-active-pill {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 7px; border-radius: 10px;
}
.pill-yes { background: #dcfce7; color: #166534; }
.pill-no  { background: #fee2e2; color: #991b1b; }

.pl-inactive-badge {
    display: inline-block; background: #f0f2f5; color: #57606a;
    font-size: 11px; padding: 1px 6px; border-radius: 3px; margin-left: 4px;
}

/* ── Coverage chart ───────────────────────────────────────────────────────── */
.cov-section { margin-bottom: 28px; }
.cov-heading {
    font-size: 13px; font-weight: 700; margin-bottom: 12px;
    padding-bottom: 5px; border-bottom: 1px solid #e5e7eb; color: #57606a;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.cov-chart { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cov-row {
    display: grid;
    grid-template-columns: 160px 1fr 110px;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.cov-label { color: #1f2328; font-weight: 500; white-space: nowrap; }
.cov-track { height: 10px; background: #f0f2f5; border-radius: 5px; overflow: hidden; }
.cov-fill  { height: 100%; border-radius: 5px; transition: width 0.4s ease; }
.cov-good  { background: #16a34a; }
.cov-med   { background: #f59e0b; }
.cov-poor  { background: #dc2626; }
.cov-pct   { font-size: 12px; color: #57606a; text-align: right; }
.cov-pct small { color: #8b949e; }

.cov-gap-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.cov-gap-item { font-size: 12px; color: #57606a; }
.gap-warn strong { color: #991b1b; }
.gap-ok   strong { color: #166534; }

/* ── Dedup cards ──────────────────────────────────────────────────────────── */
.dup-card {
    border: 1px solid #e5e7eb; border-radius: 7px;
    padding: 14px 16px; margin-bottom: 12px; background: #fff;
}
.dup-pair {
    display: grid; grid-template-columns: 1fr 52px 1fr;
    align-items: center; gap: 12px; margin-bottom: 10px;
}
.dup-place { padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 5px; }
.dup-inactive { opacity: 0.6; background: #f7f8fa; }
.dup-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.dup-meta { font-size: 12px; color: #57606a; }
.dup-sim-badge {
    text-align: center; font-size: 13px; font-weight: 800;
    color: #f59e0b; background: #fef9c3; border-radius: 4px; padding: 6px 4px;
}
.dup-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Place edit/add modal ─────────────────────────────────────────────────── */
.pl-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center; z-index: 9000;
}
.pl-modal {
    background: #fff; border-radius: 8px; padding: 24px 28px;
    min-width: 360px; max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.pl-modal-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.pl-modal-body  { font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
.pl-modal-warn  {
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 5px;
    padding: 9px 12px; font-size: 12px; color: #991b1b; margin-bottom: 16px;
}
.pl-modal-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pl-field-row {
    display: grid; grid-template-columns: 110px 1fr;
    align-items: center; gap: 10px;
}
.pl-field-label { font-size: 12px; color: #57606a; text-align: right; }
.pl-required { color: #dc2626; }
.pl-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
