/* ==========================================================================
   IndoLocator Standalone Stylesheet (Admin Panel & Frontend Map Locator)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ADMIN PANEL STYLES (1:1 TAILWIND MATCH)
   -------------------------------------------------------------------------- */
.indolocator-admin-page-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    margin: 20px 20px 40px 0;
    box-sizing: border-box;
    max-width: 1280px;
}
.indolocator-admin-page-root * {
    box-sizing: border-box;
}

/* Toast */
.indolocator-admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    font-size: 13.5px;
    font-weight: 600;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #334155;
    animation: indolocatorFadeIn 0.2s ease-in-out;
}
.indolocator-toast-svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

/* Header */
.indolocator-admin-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.indolocator-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}
.indolocator-header-logo {
    width: 42px;
    height: 42px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.indolocator-header-title h1 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
}
.indolocator-header-title p {
    font-size: 13px;
    color: #64748b;
    margin: 3px 0 0 0;
}
.indolocator-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.indolocator-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    line-height: 1.4;
}
.indolocator-btn-primary {
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}
.indolocator-btn-primary:hover {
    background: #1d4ed8;
}
.indolocator-btn-secondary {
    background: #ffffff;
    color: #334155 !important;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.indolocator-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.indolocator-btn-dark {
    background: #0f172a;
    color: #ffffff !important;
}
.indolocator-btn-dark:hover {
    background: #1e293b;
}
.indolocator-btn-light {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}
.indolocator-btn-light:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.indolocator-btn-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
}
.indolocator-btn-link:hover {
    text-decoration: underline;
}
.full-width {
    width: 100%;
    justify-content: center;
}

/* Metrics Cards */
.indolocator-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1024px) {
    .indolocator-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .indolocator-metrics-grid {
        grid-template-columns: 1fr;
    }
}
.indolocator-metric-card {
    background: #ffffff;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.indolocator-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    margin-bottom: 8px;
}
.indolocator-metric-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #64748b;
    text-transform: uppercase;
}
.indolocator-metric-icon {
    width: 18px !important;
    height: 18px !important;
}
.indolocator-metric-val {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
.indolocator-metric-sub {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tabs */
.indolocator-admin-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
    overflow-x: auto;
}
.indolocator-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}
.indolocator-tab-btn:hover {
    color: #0f172a;
}
.indolocator-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 700;
}
.indolocator-tab-btn svg {
    width: 16px !important;
    height: 16px !important;
}

/* Table Card & Toolbar */
.indolocator-table-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    overflow: hidden;
}
.indolocator-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
}
.indolocator-toolbar-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    align-items: center;
}
.indolocator-search-wrapper {
    position: relative;
    min-width: 240px;
    flex: 1;
}
.indolocator-search-wrapper input {
    width: 100%;
    height: 38px;
    padding: 6px 12px 6px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}
.indolocator-search-wrapper input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.indolocator-search-icon-svg {
    position: absolute;
    left: 11px;
    top: 11px;
    width: 16px !important;
    height: 16px !important;
    color: #94a3b8;
    pointer-events: none;
}
.indolocator-select-filter {
    height: 38px;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
    color: #334155;
    outline: none;
    cursor: pointer;
}
.indolocator-select-filter:focus {
    border-color: #2563eb;
}
.indolocator-toolbar-status {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
}

/* Responsive Table */
.indolocator-table-responsive {
    width: 100%;
    overflow-x: auto;
}
.indolocator-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.indolocator-table th {
    background: #f8fafc;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 11.5px;
    color: #475569;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
}
.indolocator-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.indolocator-table tr:hover td {
    background: #f8fafc;
}

/* Table Item Components */
.dist-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 13.5px;
    line-height: 1.3;
}
.dist-addr {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.badge-featured {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}
.badge-partner {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.dist-city {
    font-weight: 700;
    color: #0f172a;
}
.dist-prov {
    font-size: 12px;
    color: #64748b;
}
.dist-wa {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #16a34a;
    font-weight: 600;
    text-decoration: none;
}
.dist-wa:hover {
    text-decoration: underline;
    color: #15803d;
}
.dist-phone {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}
.btn-toggle-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.btn-toggle-status.status-active {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.btn-toggle-status.status-active:hover {
    background: #dcfce7;
}
.btn-toggle-status.status-inactive {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.btn-toggle-status.status-inactive:hover {
    background: #fee2e2;
}
.btn-action {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.15s ease;
}
.btn-action:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.btn-action.btn-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Settings Form */
.indolocator-settings-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.indolocator-settings-card h2 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
}
.indolocator-card-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px 0;
}
.indolocator-form-group {
    margin-bottom: 16px;
}
.indolocator-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.indolocator-form-group input[type="text"],
.indolocator-form-group input[type="number"],
.indolocator-form-group select,
.indolocator-form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}
.indolocator-form-group input:focus,
.indolocator-form-group select:focus,
.indolocator-form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.indolocator-form-group small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
}
.indolocator-code-var {
    background: #f1f5f9;
    color: #2563eb;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 11.5px;
    font-family: monospace;
}
.indolocator-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 640px) {
    .indolocator-grid-2 {
        grid-template-columns: 1fr;
    }
}
.indolocator-color-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.indolocator-color-input-wrap input[type="color"] {
    width: 42px;
    height: 38px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
}
.indolocator-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 20px 0;
}
.indolocator-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
}
.indolocator-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.indolocator-settings-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: 20px;
}

/* Box Card (Import / Export) */
.indolocator-box-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.indolocator-box-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.indolocator-box-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.indolocator-box-card p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 8px 0;
    line-height: 1.5;
}
.indolocator-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.indolocator-dropzone:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

/* Modal Popup Window */
.indolocator-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.indolocator-modal-window {
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    flex-direction: column;
}
.indolocator-modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}
.indolocator-modal-header h3 {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.indolocator-modal-close-btn {
    background: #f1f5f9;
    border: none;
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.indolocator-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.indolocator-modal-body {
    padding: 20px 22px;
}
.indolocator-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Category Chips in Modal */
.indolocator-category-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.indolocator-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.indolocator-category-chip:hover {
    background: #e2e8f0;
}
.indolocator-category-chip.active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

/* Utility Colors & Sizes (Tailwind equivalents for WP Admin SVGs) */
.text-blue { color: #2563eb !important; }
.text-green { color: #16a34a !important; }
.text-purple { color: #7c3aed !important; }
.text-red { color: #dc2626 !important; }
.text-muted { color: #64748b !important; }
.bg-blue-light { background: #eff6ff !important; }
.bg-green-light { background: #f0fdf4 !important; }

/* Critical sizing utilities for SVG icons in admin panel */
.w-3 { width: 0.75rem !important; }
.h-3 { height: 0.75rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-5 { width: 1.25rem !important; }
.h-5 { height: 1.25rem !important; }
.w-6 { width: 1.5rem !important; }
.h-6 { height: 1.5rem !important; }
.w-8 { width: 2rem !important; }
.h-8 { height: 2rem !important; }
.w-9 { width: 2.25rem !important; }
.h-9 { height: 2.25rem !important; }
.inline { display: inline !important; }
.shrink-0 { flex-shrink: 0 !important; }

/* --------------------------------------------------------------------------
   2. LEAFLET ISOLATION (IMMUNE TO ALL WORDPRESS THEME CSS OVERRIDES)
   -------------------------------------------------------------------------- */
.leaflet-container {
    background: #f1f5f9 !important;
    font-family: inherit !important;
    position: relative !important;
    cursor: grab !important;
}
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
}
.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    visibility: inherit !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    box-sizing: content-box !important;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
    display: block !important;
    border: none !important;
    max-width: none !important;
    max-height: none !important;
}
.leaflet-popup-content-wrapper {
    background: #ffffff !important;
    color: #1e293b !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2) !important;
    border-radius: 12px !important;
    padding: 1px !important;
    border: 1px solid #e2e8f0 !important;
}
.leaflet-popup-content {
    margin: 12px 14px !important;
    line-height: 1.4 !important;
    font-size: 12px !important;
}
.leaflet-popup-tip-container {
    width: 40px !important;
    height: 20px !important;
    position: absolute !important;
    left: 50% !important;
    margin-left: -20px !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
.leaflet-popup-tip {
    width: 14px !important;
    height: 14px !important;
    padding: 1px !important;
    margin: -8px auto 0 !important;
    transform: rotate(45deg) !important;
    background: #ffffff !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2) !important;
}
.leaflet-control-zoom {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
}
.leaflet-control-zoom a {
    background: #ffffff !important;
    color: #1e293b !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: bold !important;
    display: block !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.leaflet-control-zoom a:hover {
    background: #f8fafc !important;
    color: #2563eb !important;
}

/* --------------------------------------------------------------------------
   3. FRONTEND SHORTCODE WRAPPER (DEFAULT FULL-WIDTH & BOXED SAFE)
   -------------------------------------------------------------------------- */
.indolocator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
    position: relative !important;
    width: 100% !important;
    margin: 2rem auto 2.5rem auto !important;
    padding: 0 !important;
    clear: both !important;
    line-height: 1.5 !important;
    scroll-margin-top: 100px !important;
}
.indolocator-wrapper * { 
    box-sizing: border-box !important; 
}

/* Breakout fullwidth CSS fallback */
.indolocator-wrapper.indolocator-breakout-mode {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 2rem !important;
    max-width: 100vw !important;
    padding-left: clamp(16px, 3.5vw, 48px) !important;
    padding-right: clamp(16px, 3.5vw, 48px) !important;
    box-sizing: border-box !important;
}

/* Strict SVG sizing lock against Elementor / Astra / Kadence overrides */
.indolocator-wrapper svg,
.indolocator-wrapper svg:not(:root),
.indolocator-modal-overlay svg,
.indolocator-modal-overlay svg:not(:root) {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.indolocator-wrapper .indolocator-search-icon,
.indolocator-wrapper .indolocator-search-box svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

.indolocator-wrapper .indolocator-btn-filter-modal svg,
.indolocator-wrapper .indolocator-btn-geo svg,
.indolocator-wrapper .indolocator-count-heading svg,
.indolocator-wrapper .indolocator-btn-map-control svg {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
}

.indolocator-wrapper .indolocator-sort-wrap svg {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    min-height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
}

.indolocator-custom-pin,
.indolocator-custom-pin div {
    box-sizing: border-box !important;
}
.indolocator-custom-pin svg,
.indolocator-custom-pin svg:not(:root) {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
}

.indolocator-wrapper input,
.indolocator-wrapper select,
.indolocator-wrapper button,
.indolocator-wrapper a {
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* --------------------------------------------------------------------------
   4. TOP TOOLBAR & FILTER SECTION
   -------------------------------------------------------------------------- */
.indolocator-toolbar {
    background: #ffffff !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
}
.indolocator-toolbar-row1 {
    display: grid !important;
    grid-template-columns: 2fr 1.6fr auto !important;
    gap: 14px !important;
    align-items: flex-end !important;
}
@media (max-width: 900px) {
    .indolocator-toolbar-row1 {
        grid-template-columns: 1fr !important;
    }
}

.indolocator-field-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}
.indolocator-field-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
    margin: 0 !important;
}

.indolocator-search-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}
.indolocator-search-icon {
    position: absolute !important;
    left: 12px !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
}
.indolocator-input-search {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 14px 8px 36px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    outline: none !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
}
.indolocator-input-search:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}
.indolocator-search-clear {
    position: absolute !important;
    right: 10px !important;
    background: none !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    font-size: 16px !important;
    padding: 4px !important;
    line-height: 1 !important;
}

.indolocator-select-province {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
}
.indolocator-select-province:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
}

.indolocator-action-buttons-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 42px !important;
}
.indolocator-btn-filter-modal {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 42px !important;
    padding: 0 16px !important;
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}
.indolocator-btn-filter-modal:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}
.indolocator-filter-badge-count {
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.indolocator-btn-geo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 42px !important;
    padding: 0 16px !important;
    background: #ffffff !important;
    color: #16a34a !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}
.indolocator-btn-geo:hover {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
}

/* --------------------------------------------------------------------------
   5. MOBILE VIEW SWITCHER TABS
   -------------------------------------------------------------------------- */
.indolocator-mobile-tabs {
    display: none;
    background: #e2e8f0 !important;
    padding: 4px !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}
.indolocator-mobile-tab-btn {
    flex: 1 !important;
    padding: 8px 12px !important;
    border: none !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}
.indolocator-mobile-tab-btn.active {
    background: #ffffff !important;
    color: #2563eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* --------------------------------------------------------------------------
   6. MAIN CONTENT GRID (SPLIT SIDEBAR + MAP)
   -------------------------------------------------------------------------- */
.indolocator-main-grid {
    display: grid !important;
    grid-template-columns: minmax(280px, 380px) 1fr !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06) !important;
    width: 100% !important;
    min-height: 620px !important;
    height: 680px !important;
}

/* If container is boxed or narrower, adapt gracefully */
@media (max-width: 1080px) {
    .indolocator-main-grid {
        grid-template-columns: minmax(260px, 320px) 1fr !important;
        min-height: 580px !important;
    }
}

/* SIDEBAR LIST */
.indolocator-sidebar {
    width: 100% !important;
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 5 !important;
    height: 100% !important;
}
.indolocator-sidebar-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 18px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
}
.indolocator-count-heading {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: 0.2px !important;
}
.indolocator-count-heading svg {
    color: #2563eb !important;
}
.indolocator-sort-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #64748b !important;
}
.indolocator-select-sort {
    background: transparent !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    outline: none !important;
    cursor: pointer !important;
    padding: 2px 4px !important;
    box-shadow: none !important;
}
.indolocator-cards-container {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 14px !important;
    height: 100% !important;
}
.indolocator-cards-container::-webkit-scrollbar {
    width: 6px !important;
}
.indolocator-cards-container::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
}

/* DISTRIBUTOR CARD ITEM */
.indolocator-card-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}
.indolocator-card-item:hover,
.indolocator-card-item.selected {
    border-color: #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12) !important;
}
.indolocator-card-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}
.indolocator-card-address-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}
.indolocator-card-address-row svg {
    color: #94a3b8 !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}
.indolocator-card-meta-box {
    background: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    font-size: 11.5px !important;
    color: #475569 !important;
}
.indolocator-meta-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.indolocator-meta-item svg {
    color: #94a3b8 !important;
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
}
.indolocator-meta-rating {
    color: #d97706 !important;
    font-weight: 700 !important;
}
.indolocator-card-actions {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    gap: 6px !important;
    margin-top: 2px !important;
}
.indolocator-btn-wa {
    background: #16a34a !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: none !important;
    transition: background 0.15s ease !important;
}
.indolocator-btn-wa:hover {
    background: #15803d !important;
    color: #ffffff !important;
}
.indolocator-btn-dir {
    background: #ffffff !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.indolocator-btn-dir:hover {
    background: #f0f9ff !important;
}
.indolocator-btn-detail {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}
.indolocator-btn-detail:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* --------------------------------------------------------------------------
   7. MAP CONTAINER & FLOATING WIDGETS
   -------------------------------------------------------------------------- */
.indolocator-map-container {
    flex: 1 !important;
    position: relative !important;
    height: 100% !important;
    background: #e2e8f0 !important;
    min-height: 520px !important;
    width: 100% !important;
}
#indolocator-leaflet-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 520px !important;
    z-index: 1 !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* Floating Top Bar on Map */
.indolocator-map-top-bar {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #ffffff !important;
    padding: 5px 10px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border: 1px solid #e2e8f0 !important;
}
.indolocator-map-live-tag {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #2563eb !important;
    letter-spacing: 0.5px !important;
    padding-right: 8px !important;
    border-right: 1px solid #e2e8f0 !important;
}
.indolocator-live-dot {
    width: 8px !important;
    height: 8px !important;
    background: #22c55e !important;
    border-radius: 50% !important;
    animation: indolocatorPulse 1.5s infinite !important;
}
.indolocator-tile-switcher {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}
.indolocator-tile-btn {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.indolocator-tile-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
.indolocator-tile-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Floating Bottom Legend */
.indolocator-map-legend {
    position: absolute !important;
    bottom: 14px !important;
    left: 14px !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(4px) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #475569 !important;
}
.indolocator-legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}
.indolocator-legend-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
}
.dot-utama { background: #d97706 !important; }
.dot-super { background: #7c3aed !important; }
.dot-dealer { background: #2563eb !important; }

/* Floating Map Controls */
.indolocator-map-floating-controls {
    position: absolute !important;
    bottom: 14px !important;
    right: 14px !important;
    z-index: 999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}
.indolocator-btn-map-control {
    width: 32px !important;
    height: 32px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08) !important;
}
.indolocator-btn-map-control:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* --------------------------------------------------------------------------
   8. MODAL WINDOWS (DETAIL & FILTER)
   -------------------------------------------------------------------------- */
.indolocator-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(3px) !important;
    z-index: 999999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}
.indolocator-modal-box {
    background: #ffffff !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 580px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.3) !important;
    border: 1px solid #e2e8f0 !important;
    position: relative !important;
}
.indolocator-modal-head {
    padding: 16px 20px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: relative !important;
    background: #ffffff !important;
}
.indolocator-modal-close,
.indolocator-filter-modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    background: #f1f5f9 !important;
    border: none !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    line-height: 1 !important;
    color: #64748b !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.indolocator-modal-close:hover,
.indolocator-filter-modal-close:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
.indolocator-modal-content {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE MOBILE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .indolocator-mobile-tabs {
        display: flex !important;
    }
    .indolocator-main-grid {
        flex-direction: column !important;
        height: auto !important;
    }
    .indolocator-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: 520px !important;
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .indolocator-map-container {
        height: 440px !important;
        min-height: 440px !important;
        width: 100% !important;
    }
    .indolocator-main-grid[data-mobile-view="map"] .indolocator-sidebar {
        display: none !important;
    }
    .indolocator-main-grid[data-mobile-view="map"] .indolocator-map-container {
        display: block !important;
        height: 540px !important;
    }
    .indolocator-main-grid[data-mobile-view="list"] .indolocator-map-container {
        display: none !important;
    }
    .indolocator-main-grid[data-mobile-view="list"] .indolocator-sidebar {
        display: flex !important;
        height: 600px !important;
    }
}
