/* DEV-2.03 | SET-05 Location Master */

.v2-theme .settings-location{margin-top:18px}
.v2-theme .settings-location__toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px;padding:17px 18px;border:1px solid var(--v2-color-border);border-radius:var(--v2-radius-xl);background:var(--v2-color-surface);box-shadow:var(--v2-shadow-card)}
.v2-theme .settings-location__toolbar h2{margin:0;color:var(--v2-color-ink-950);font-size:var(--v2-font-size-18);font-weight:var(--v2-font-weight-bold)}
.v2-theme .settings-location__toolbar p{margin:5px 0 0;color:var(--v2-color-ink-600);font-size:var(--v2-font-size-11)}
.v2-theme .settings-location__toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}

.v2-theme .settings-location__summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}
.v2-theme .settings-location__summary article{min-height:86px;display:flex;flex-direction:column;justify-content:center;padding:14px 16px;border:1px solid var(--v2-color-border);border-radius:var(--v2-radius-lg);background:var(--v2-color-surface);box-shadow:var(--v2-shadow-xs)}
.v2-theme .settings-location__summary span{color:var(--v2-color-ink-600);font-size:var(--v2-font-size-10);font-weight:var(--v2-font-weight-semibold)}
.v2-theme .settings-location__summary strong{margin-top:5px;color:var(--v2-color-ink-950);font-size:var(--v2-font-size-24);line-height:1}
.v2-theme .settings-location__summary small{margin-top:5px;color:var(--v2-color-ink-500);font-size:var(--v2-font-size-10)}
.v2-theme .settings-location__summary small[data-complete="0"]{color:var(--v2-color-warning);font-weight:var(--v2-font-weight-bold)}
.v2-theme .settings-location__summary small[data-complete="1"]{color:var(--v2-color-success);font-weight:var(--v2-font-weight-bold)}

.v2-theme .settings-location__regions{display:flex;gap:8px;margin-bottom:12px;overflow-x:auto}
.v2-theme .settings-location__regions article{flex:0 0 auto;min-width:132px;display:grid;grid-template-columns:auto 1fr;gap:3px 8px;padding:9px 11px;border:1px solid var(--v2-color-border-soft);border-radius:var(--v2-radius-lg);background:var(--v2-color-surface-soft)}
.v2-theme .settings-location__regions span{color:var(--v2-color-brand-800);font-size:var(--v2-font-size-10);font-weight:var(--v2-font-weight-bold)}
.v2-theme .settings-location__regions strong{color:var(--v2-color-ink-900);font-size:var(--v2-font-size-12)}
.v2-theme .settings-location__regions small{grid-column:1/-1;color:var(--v2-color-ink-500);font-size:var(--v2-font-size-10)}

.v2-theme .settings-location__tabs{display:flex;gap:6px;padding:5px;border:1px solid var(--v2-color-border);border-radius:var(--v2-radius-lg) var(--v2-radius-lg) 0 0;background:var(--v2-color-surface)}
.v2-theme .settings-location__tab{min-height:36px;padding:0 14px;border:1px solid transparent;border-radius:var(--v2-radius-sm);background:transparent;color:var(--v2-color-ink-600);font:inherit;font-size:var(--v2-font-size-12);font-weight:var(--v2-font-weight-semibold);cursor:pointer}
.v2-theme .settings-location__tab.is-active{border-color:#bee2e5;background:var(--v2-color-brand-050);color:var(--v2-color-brand-900)}

.v2-theme .settings-location__panel{border:1px solid var(--v2-color-border);border-top:0;border-radius:0 0 var(--v2-radius-xl) var(--v2-radius-xl);background:var(--v2-color-surface);box-shadow:var(--v2-shadow-card)}
.v2-theme .settings-location__filters{display:grid;grid-template-columns:minmax(260px,1fr) minmax(150px,220px) minmax(150px,220px);gap:10px;padding:12px 14px;border-bottom:1px solid var(--v2-color-border-soft)}
.v2-theme .settings-location__filters label{display:flex;flex-direction:column;gap:4px;color:var(--v2-color-ink-600);font-size:var(--v2-font-size-10);font-weight:var(--v2-font-weight-semibold)}
.v2-theme .settings-location__filters .v2-input,.v2-theme .settings-location__filters .v2-select{min-height:38px;border-radius:var(--v2-radius-sm);font-size:var(--v2-font-size-12)}

.v2-theme .settings-location__table-wrap{max-height:calc(100vh - 470px);min-height:260px;overflow:auto}
.v2-theme .settings-location__table{width:100%;border-collapse:collapse;color:var(--v2-color-ink-900);font-size:var(--v2-font-size-11)}
.v2-theme .settings-location__table th{position:sticky;top:0;z-index:2;height:34px;padding:0 10px;border-bottom:1px solid var(--v2-color-border);background:var(--v2-color-surface-muted);color:var(--v2-color-ink-600);text-align:left;font-size:var(--v2-font-size-10);font-weight:var(--v2-font-weight-bold);white-space:nowrap}
.v2-theme .settings-location__table td{padding:7px 10px;border-bottom:1px solid var(--v2-color-border-soft);vertical-align:middle}
.v2-theme .settings-location__table tbody tr:hover{background:var(--v2-color-brand-050)}
.v2-theme .settings-location__postal{display:inline-flex;padding:3px 7px;border-radius:var(--v2-radius-pill);background:#f1f4f7;color:var(--v2-color-ink-800);font-family:var(--v2-font-mono);font-size:var(--v2-font-size-11);font-weight:var(--v2-font-weight-bold)}
.v2-theme .settings-location__row-actions{display:flex;gap:5px;white-space:nowrap}
.v2-theme .settings-location__row-actions .v2-button{min-height:29px;padding:0 8px;font-size:var(--v2-font-size-10)}
.v2-theme .settings-location__empty{padding:28px;color:var(--v2-color-ink-500);text-align:center}
.v2-theme .settings-location__state{margin-top:10px;padding:10px 12px;border:1px solid var(--v2-color-border);border-radius:var(--v2-radius-sm);background:var(--v2-color-surface-muted);color:var(--v2-color-ink-600);font-size:var(--v2-font-size-11)}
.v2-theme .settings-location__state[data-level="error"]{border-color:#efc5c1;background:var(--v2-color-danger-bg);color:var(--v2-color-danger)}

.v2-theme .settings-location-editor .work-layer-modal-card{width:min(620px,100%)}
.v2-theme .settings-location-editor__header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 20px 14px;border-bottom:1px solid var(--v2-color-border-soft)}
.v2-theme .settings-location-editor__eyebrow{color:var(--v2-color-brand-700);font-size:var(--v2-font-size-10);font-weight:var(--v2-font-weight-bold)}
.v2-theme .settings-location-editor__header h2{margin:3px 0 0;color:var(--v2-color-ink-950);font-size:var(--v2-font-size-18)}
.v2-theme .settings-location-editor__close{width:34px;height:34px;border:1px solid var(--v2-color-border);border-radius:50%;background:var(--v2-color-surface);color:var(--v2-color-ink-700);font-size:21px;line-height:1;cursor:pointer}
.v2-theme .settings-location-editor__form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px 20px}
.v2-theme .settings-location-editor__form label{display:flex;flex-direction:column;gap:5px;color:var(--v2-color-ink-700);font-size:var(--v2-font-size-11);font-weight:var(--v2-font-weight-semibold)}
.v2-theme .settings-location-editor__form .v2-input,.v2-theme .settings-location-editor__form .v2-select{min-height:40px;border-radius:var(--v2-radius-sm);font-size:var(--v2-font-size-12)}
.v2-theme .settings-location-editor__check{flex-direction:row!important;align-items:center;align-self:end;min-height:40px}
.v2-theme .settings-location-editor__check input{width:16px;height:16px}
.v2-theme .settings-location-editor__footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 18px;border-top:1px solid var(--v2-color-border-soft)}

@media(max-width:1180px){
  .v2-theme .settings-location__summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v2-theme .settings-location__table-wrap{max-height:calc(100vh - 540px)}
}
@media(max-width:760px){
  .v2-theme .settings-location__toolbar{flex-direction:column}
  .v2-theme .settings-location__toolbar-actions{justify-content:flex-start}
  .v2-theme .settings-location__summary,.v2-theme .settings-location__filters,.v2-theme .settings-location-editor__form{grid-template-columns:1fr}
  .v2-theme .settings-location__table-wrap{max-height:none}
}
