/**
 * DHT1230 Store Locator - Frontend Styles
 * 
 * @package DHT1230_Store_Locator
 */

/* ============================================
   Typography & Main Wrapper
   Silka deja import via wordpress elementor
   ============================================ */
/*
@font-face {
    font-family: 'Silka';
    src: local('Silka'), local('Silka-Regular'), url('../fonts/Silka-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Silka';
    src: local('Silka-Medium'), url('../fonts/Silka-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}
*/
.dht1230-sl-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Silka', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

/* ============================================
   Leaflet Marker Clusters - Dark Mode Grayscale
   ============================================ */
.marker-cluster-small {
	background-color: transparent !important;
	}
.marker-cluster-small div {
	background-color: transparent !important;
	}

.marker-cluster-medium {
	background-color: transparent !important;
	}
.marker-cluster-medium div {
	background-color: transparent !important;
	}

.marker-cluster-large {
	background-color: transparent !important;
	}
.marker-cluster-large div {
	background-color: transparent !important;
	}

.marker-cluster-small {
	background-color: rgba(110, 110, 110, 0.6) !important;
}

.marker-cluster-small div {
	background-color: rgba(110, 110, 110, 0.8) !important;
}

.marker-cluster-medium {
	background-color: rgba(150, 150, 150, 0.6) !important;
}

.marker-cluster-medium div {
	background-color: rgba(150, 150, 150, 0.8) !important;
}

.marker-cluster-large {
	background-color: rgba(180, 180, 180, 0.6) !important;
}

.marker-cluster-large div {
	background-color: rgba(180, 180, 180, 0.8) !important;
}

.marker-cluster {
	background-clip: padding-box;
	border-radius: 20px;
}

.marker-cluster div {
	width: 30px;
	height: 30px;
	margin-left: 5px;
	margin-top: 5px;
	text-align: center;
	border-radius: 15px;
	font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
	color: #fff;
	font-weight: bold;
}

.marker-cluster span {
	line-height: 30px;
}

/* ============================================
   Filters Bar & Custom Select
   ============================================ */
.dht1230-sl-filters-bar {
    background: #000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    z-index: 100; /* Higher z-index for dropdowns */
}

.dht1230-sl-filters-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Custom Select Wrapper */
.dht1230-sl-custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 200px;
}

.dht1230-sl-custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Trigger (The "Input" part) */
.dht1230-sl-custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    background: #111;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dht1230-sl-custom-select-wrapper.open .dht1230-sl-custom-select-trigger {
    border-color: #666;
    background: #222;
}

.dht1230-sl-custom-select-wrapper.disabled .dht1230-sl-custom-select-trigger {
    opacity: 0.5;
    cursor: not-allowed;
    background: #000;
}

/* Arrow */
.dht1230-sl-custom-select-trigger .arrow {
    position: relative;
    height: 10px;
    width: 10px;
}

.dht1230-sl-custom-select-trigger .arrow::before,
.dht1230-sl-custom-select-trigger .arrow::after {
    content: "";
    position: absolute;
    bottom: 0px;
    width: 0.15rem;
    height: 100%;
    transition: all 0.3s;
}

.dht1230-sl-custom-select-trigger .arrow::before {
    left: -3px;
    transform: rotate(45deg);
    background-color: #fff;
}

.dht1230-sl-custom-select-trigger .arrow::after {
    left: 3px;
    transform: rotate(-45deg);
    background-color: #fff;
}

.dht1230-sl-custom-select-wrapper.open .dht1230-sl-custom-select-trigger .arrow::before {
    transform: rotate(-45deg);
}

.dht1230-sl-custom-select-wrapper.open .dht1230-sl-custom-select-trigger .arrow::after {
    transform: rotate(45deg);
}

/* Options Dropdown */
.dht1230-sl-custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #333;
    border-top: 0;
    background: #111;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 101;
    max-height: 300px;
    overflow-y: auto;
}

.dht1230-sl-custom-select-wrapper.open .dht1230-sl-custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.dht1230-sl-custom-option {
    position: relative;
    display: block;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 400;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.dht1230-sl-custom-option:hover,
.dht1230-sl-custom-option.selected {
    color: #fff;
    background-color: #222;
}

/* Reset Button */
.dht1230-sl-reset-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    font-family: 'Silka', sans-serif;
    display: none;
}

.dht1230-sl-reset-btn.visible {
    display: inline-block;
}

.dht1230-sl-reset-btn:hover {
    color: #fff;
}

/* Counter */
.dht1230-sl-counter {
    color: #fff;
    font-family: 'Silka', serif;
}

#dht1230-sl-store-count {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Silka', serif;
}

/* ============================================
   Map Container
   ============================================ */
.dht1230-sl-main-content {
    flex: 1;
    position: relative;
    display: flex;
    overflow: hidden;
    height: 100%;
}

.dht1230-sl-map {
    flex: 1;
    height: 100%;
    position: relative;
    z-index: 1;
    background: #1a1a1a;
}

/* ============================================
   Sidebar
   ============================================ */
.dht1230-sl-sidebar {
    width: 380px; /* Slightly wider for cards */
    height: 100%;
    overflow-y: auto;
    background: #1a1a1a; /* Dark background to contrast with white cards */
    position: relative;
    z-index: 2;
    border-left: 1px solid #222;
    transition: transform 0.3s ease;
    padding: 20px;
}

.dht1230-sl-sidebar-header {
    margin-bottom: 20px;
}

.dht1230-sl-btn-back {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #fff;
    color: #000;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Silka', sans-serif;
}

.dht1230-sl-btn-back:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
}

/* ============================================
   Store List (Cards Style)
   ============================================ */
.dht1230-sl-store-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dht1230-sl-store-item {
    background: #fff; /* White Card */
    padding: 25px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0; /* Sharp edges for luxury feel */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.dht1230-sl-store-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.dht1230-sl-store-item.active {
    border-left: 4px solid #000; /* Black accent for active */
    background: #fff;
}

.dht1230-sl-store-title {
    margin: 0 0 10px 0;
    color: #000; /* Dark text */
    font-size: 16px;
    font-weight: 500;
    font-family: 'Silka', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dht1230-sl-store-content {
    color: #1a1a1a;
    font-size: 13px;
    line-height: 1.6;
}

.dht1230-sl-store-content p {
    margin: 0 0 5px 0;
}

.dht1230-sl-store-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.dht1230-sl-store-actions a {
    color: #000;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    border-bottom: 1px solid #ccc;
    padding-bottom: 2px;
    transition: border-color 0.2s ease;
}

.dht1230-sl-store-actions a:hover {
    border-color: #000;
}

/* ============================================
   Leaflet Customization (Light Mode Popups)
   ============================================ */
.leaflet-popup-content-wrapper {
    border-radius: 0 !important;
    background: #fff !important; /* White background */
    color: #000 !important; /* Dark text */
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    padding: 0;
}

.leaflet-popup-tip {
    background: #fff !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.leaflet-popup-content {
    margin: 20px;
    font-family: 'Silka', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.leaflet-popup-content h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #000;
    font-family: 'Silka', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.leaflet-popup-content p {
    margin: 0 0 5px 0;
    font-size: 12px;
    line-height: 1.5;
    color: #444;
}

.leaflet-popup-content a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
    transition: border-color 0.2s ease;
}

.leaflet-popup-content a:hover {
    border-color: #000;
}

/* Remove default close button styling and make it cleaner */
.leaflet-container a.leaflet-popup-close-button {
    color: #999;
    padding: 8px;
    font-size: 18px;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: #000;
}

/* ============================================
   Google Maps Info Window (Light Mode)
   ============================================ */
.gm-style .gm-style-iw-c {
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3) !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
    padding: 20px !important;
}

.dht1230-sl-infowindow {
    font-family: 'Silka', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    max-width: 250px;
}

.dht1230-sl-infowindow h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #000;
    font-family: 'Silka', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dht1230-sl-infowindow p {
    margin: 0 0 5px 0;
    font-size: 12px;
    line-height: 1.5;
    color: #444;
}

.dht1230-sl-infowindow a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
}

.dht1230-sl-infowindow a:hover {
    border-color: #000;
}

/* ============================================
   Responsive
   ============================================ */
@media screen and (max-width: 900px) {
    .dht1230-sl-filters-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dht1230-sl-filters-group {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .dht1230-sl-custom-select-wrapper {
        flex: 1;
        width: auto;
        min-width: 140px;
    }
    
    .dht1230-sl-counter {
        width: 100%;
        text-align: right;
        padding-top: 10px;
        border-top: 1px solid #222;
    }
}

@media screen and (max-width: 768px) {
    .dht1230-sl-main-content {
        flex-direction: column;
    }
    
    .dht1230-sl-sidebar {
        width: 100%;
        height: 40%;
        border-left: none;
        border-top: 1px solid #222;
        padding: 15px;
    }
    
    .dht1230-sl-map {
        height: 60%;
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
.dht1230-sl-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dht1230-sl-sidebar::-webkit-scrollbar-track {
    background: #111;
}

.dht1230-sl-sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 0;
}

.dht1230-sl-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dht1230-sl-custom-options::-webkit-scrollbar {
    width: 6px;
}

.dht1230-sl-custom-options::-webkit-scrollbar-track {
    background: #111;
}

.dht1230-sl-custom-options::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 0;
}


/** override leaflet */
.leaflet-marker-icon.leaflet-zoom-animated.leaflet-interactive {
    height: auto !important;
}
body .leaflet-popup-content h3 {
    font-size: 15px;
}


/* Mobile */
@media (max-width: 768px) {
    #dht1230-sl-sidebar {
        width: 100% !important;
    }
    .dht1230-sl-sidebar-header, #dht1230-sl-back-to-map {
        display: none;
    }
}