/**
 * Reka Bogor Ekraf GIS - Stylesheet
 * Dibuat untuk: REKA BOGOR (www.rekabogor.id)
 * Pembuat: Dhoni Saputra menggunakan Gemini AI Studio
 */
.ekraf-plugin-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.ekraf-plugin-root * {
    box-sizing: border-box;
}

/* Banner */
.ekraf-brand-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #fce7f3;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ekraf-brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ekraf-rb-badge {
    background: #ef4277;
    color: #ffffff;
    font-weight: 900;
    font-size: 14px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.5px;
}

.ekraf-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.ekraf-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: #64748b;
}

.ekraf-counter-badge {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* SVG Wrapper */
.ekraf-svg-canvas-wrapper {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 18px;
    overflow: hidden;
}

.reka-bogor-svg {
    width: 100%;
    height: auto;
    max-height: 520px;
    display: block;
    margin: 0 auto;
}

.ekraf-svg-caption {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 12px;
}

.ekraf-tooltip {
    position: absolute;
    display: none;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    pointer-events: none;
    z-index: 99;
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.38);
    border: 1px solid #334155;
    line-height: 1.4;
    text-align: left;
    max-width: 250px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ekraf-tooltip-header {
    margin-bottom: 2px;
}

.ekraf-tooltip-title {
    font-size: 13px;
    font-weight: 800;
    color: #f472b6;
    display: block;
}

.ekraf-tooltip-stats {
    font-size: 11px;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.ekraf-tooltip-num {
    color: #ffffff;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ekraf-tooltip-desc {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.35;
    margin-bottom: 5px;
}

.ekraf-tooltip-cta {
    font-size: 10px;
    color: #f472b6;
    font-weight: 600;
    padding-top: 5px;
    border-top: 1px solid #1e293b;
}

/* Filters */
.ekraf-filter-container {
    position: relative;
    z-index: 50;
    overflow: visible !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ekraf-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ekraf-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.ekraf-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ekraf-pill.is-active {
    background: #ef4277;
    color: #ffffff;
    border-color: #ef4277;
    box-shadow: 0 2px 6px rgba(239, 66, 119, 0.35);
}

.ekraf-pill-count {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    line-height: 1.35;
    display: inline-block;
    transition: all 0.2s ease;
}

.ekraf-pill.is-active .ekraf-pill-count {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.ekraf-search-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible !important;
}

@media (min-width: 640px) {
    .ekraf-search-row {
        flex-direction: row;
    }
}

.ekraf-search-input-box {
    flex: 1;
}

.ekraf-search-input-box input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.2s;
}

.ekraf-search-input-box input:focus {
    border-color: #ef4277;
    box-shadow: 0 0 0 2px rgba(239, 66, 119, 0.15);
}

.ekraf-subsektor-box select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    background: #ffffff;
    outline: none;
}

.ekraf-multi-sub-wrap {
    position: relative;
    min-width: 240px;
    overflow: visible !important;
}

.ekraf-multi-sub-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
}

.ekraf-multi-sub-btn:hover {
    border-color: #ef4277;
}

.ekraf-multi-sub-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 300px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 18px 34px -6px rgba(15, 23, 42, 0.22);
    padding: 10px;
    z-index: 9999 !important;
}

.ekraf-multi-sub-panel.is-open {
    display: block !important;
}

@media (max-width: 768px) {
    .ekraf-search-input-box input,
    .ekraf-multi-sub-btn {
        font-size: 16px;
    }
}

@media (max-width: 639px) {
    .ekraf-multi-sub-panel {
        left: 0;
        right: auto;
        width: 100%;
    }
}

.ekraf-multi-sub-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #475569;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 8px;
}

.ekraf-multi-sub-reset {
    background: none;
    border: none;
    color: #ef4277;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.ekraf-multi-sub-list {
    max-height: 230px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ekraf-multi-sub-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #1e293b;
    padding: 5px 6px;
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
}

.ekraf-multi-sub-item input[type="checkbox"] {
    width: auto !important;
    min-width: 0;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    -webkit-appearance: checkbox;
    appearance: checkbox;
}

.ekraf-multi-sub-item:hover {
    background: #fdf2f8;
}

.ekraf-multi-sub-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Cards Section */
.ekraf-cards-section {
    margin-top: 10px;
}

.ekraf-cards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ekraf-cards-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.ekraf-results-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.ekraf-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .ekraf-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .ekraf-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ekraf-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ekraf-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(0,0,0,0.08);
    border-color: #fbcfe8;
}

.ekraf-card-img {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #f1f5f9;
}

.ekraf-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ekraf-card-badge {
    background: #ef4277;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.ekraf-card-kec {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}

.ekraf-card-body {
    padding: 12px;
    flex: 1;
}

.ekraf-card-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.ekraf-card-owner {
    margin: 0 0 6px;
    font-size: 11px;
    color: #64748b;
}

.ekraf-card-desc {
    margin: 0 0 8px;
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ekraf-card-address {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ekraf-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.ekraf-btn-detail {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: #ef4277;
    cursor: pointer;
    padding: 4px 6px;
}

.ekraf-btn-detail:hover {
    text-decoration: underline;
}

.ekraf-btn-wa {
    background: #16a34a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.ekraf-btn-wa:hover {
    background: #15803d;
    color: #ffffff;
}

/* Modal */
.ekraf-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.7);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ekraf-modal-card {
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 24px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.ekraf-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ekraf-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* District Path & Label Styles inside Pure SVG Map */
.reka-bogor-svg .map-district {
    fill: #ffffff;
    stroke: #008753;
    stroke-width: 1.5px;
    transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.reka-bogor-svg .map-district:hover {
    fill: #fde7ef;
    stroke: #ef4277;
    stroke-width: 2.2px;
}

.reka-bogor-svg .map-district.is-active {
    fill: #ef4277;
    stroke: #be185d;
    stroke-width: 2.5px;
}

.reka-bogor-svg .district-label {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 700;
    fill: #00663e;
    text-anchor: middle;
    pointer-events: none;
    user-select: none;
}

.reka-bogor-svg .district-label.is-active-label {
    fill: #ffffff;
}

/* Modal Inner Detail Styles */
.ekraf-modal-head {
    margin-bottom: 14px;
}

.ekraf-modal-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.ekraf-modal-badge {
    display: inline-block;
    background: #fdf2f8;
    color: #be185d;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.ekraf-modal-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.ekraf-modal-subtitle {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
}

.ekraf-modal-info {
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #334155;
    line-height: 1.65;
    margin-bottom: 14px;
}

.ekraf-modal-ig {
    color: #ef4277;
    font-weight: 600;
    text-decoration: none;
}

.ekraf-modal-link {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.ekraf-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ekraf-modal-wa-btn {
    flex: 1;
    text-align: center;
    background: #16a34a;
    color: #ffffff;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

.ekraf-modal-wa-btn:hover {
    background: #15803d;
    color: #ffffff;
}

.ekraf-modal-close-btn {
    background: #e2e8f0;
    color: #334155;
    border: none;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.ekraf-modal-close-btn:hover {
    background: #cbd5e1;
}

/* Zoom Kawasan Bar & Scatter Pins Overlay */
.ekraf-svg-zoom-bar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: none;
}

.ekraf-svg-zoom-badge {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.ekraf-svg-reset-btn {
    pointer-events: auto;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    transition: all 0.2s ease;
}

.ekraf-svg-reset-btn:hover {
    background: #fdf2f8;
    border-color: #ef4277;
    color: #be185d;
}

.reka-bogor-svg.is-zoomed .map-district:not(.is-active) {
    fill: #f1f5f9;
    stroke: #cbd5e1;
    opacity: 0.42;
}

.reka-bogor-svg.is-zoomed .map-district.is-active {
    fill: #fdf2f8;
    stroke: #ef4277;
    stroke-width: 2.2px;
}

.ekraf-svg-pin-group {
    cursor: pointer;
}

.ekraf-svg-pin-dot {
    transition: transform 0.18s ease;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.45));
}

.ekraf-svg-pin-group:hover .ekraf-svg-pin-dot {
    transform: scale(1.25);
}

.ekraf-svg-pin-label {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 4.6px;
    font-weight: 700;
    fill: #0f172a;
    paint-order: stroke;
    stroke: #ffffff;
    stroke-width: 1.6px;
    pointer-events: none;
    user-select: none;
}

/* Mini Map Titik Lokasi di Box Detil Pelaku */
.ekraf-modal-location-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.ekraf-modal-location-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #0f172a;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ekraf-modal-coords {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 8px;
    color: #475569;
}

.ekraf-modal-mini-map {
    width: 100%;
    height: 175px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    z-index: 1;
}

.ekraf-modal-gmaps-btn {
    flex: 1;
    text-align: center;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

.ekraf-modal-gmaps-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.ekraf-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.ekraf-svg-cluster-group {
    cursor: pointer;
}

.ekraf-svg-spider-leg {
    stroke: #ef4277;
    stroke-width: 1.2px;
    stroke-dasharray: 2.5 2;
    opacity: 0.78;
    pointer-events: none;
}
