/* ==========================================================================
   EMITTER - Search & Map Page Pixel-Perfect Redesign Stylesheet
   ========================================================================== */

.search-page-wrapper {
    background-color: #f8fafc;
    padding: 18px 0 28px 0;
}

/* Top Search Hero Banner */
.search-hero-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.search-hero-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin: 0 0 4px 0;
}

.search-hero-header p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

.search-input-group-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper i.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
}

.search-input-field {
    width: 100%;
    padding: 10px 16px 10px 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
}

.search-input-field:focus {
    border-color: #008a45;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 138, 69, 0.12);
}

.btn-search-main {
    background: #008a45;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-search-main:hover {
    background: #006e37;
    box-shadow: 0 4px 12px rgba(0, 138, 69, 0.25);
}

.btn-location-main {
    background: #ffffff;
    color: #008a45;
    border: 1.5px solid #008a45;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-location-main:hover {
    background: #f0fdf4;
}

/* 3-Column Search Grid */
.search-grid-layout {
    display: grid;
    grid-template-columns: 290px 1fr 360px;
    gap: 16px;
    align-items: stretch;
}

/* Left Column: Refine Your Search Card */
.refine-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.refine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.refine-header h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.btn-reset-filters {
    background: none;
    border: none;
    color: #008a45;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}

.btn-reset-filters:hover {
    text-decoration: underline;
}

.filter-group-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
}

.filter-label span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label span i {
    color: #008a45;
    font-size: 0.82rem;
    width: 14px;
}

.filter-label .view-all-link {
    color: #008a45;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

/* Charger Type Pills */
.charger-pills-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.charger-pill-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.charger-pill-btn:hover {
    border-color: #008a45;
    color: #008a45;
}

.charger-pill-btn.active {
    background: #008a45;
    border-color: #008a45;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 138, 69, 0.25);
}

/* Filter Selects */
.filter-select-field {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select-field:focus {
    border-color: #008a45;
    background: #ffffff;
}

/* Amenities 4x2 Toggle Grid */
.amenities-toggle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.amenity-toggle-btn {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.amenity-toggle-btn i {
    font-size: 1rem;
    color: #64748b;
    transition: color 0.2s;
}

.amenity-toggle-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.amenity-toggle-btn:hover {
    border-color: #008a45;
    background: #ffffff;
}

.amenity-toggle-btn.active {
    background: #f0fdf4;
    border-color: #008a45;
    box-shadow: 0 2px 6px rgba(0, 138, 69, 0.15);
}

.amenity-toggle-btn.active i {
    color: #008a45;
}

.amenity-toggle-btn.active span {
    color: #008a45;
    font-weight: 700;
}

/* Price Range Inputs */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input-field {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    text-align: center;
}

.price-input-field:focus {
    border-color: #008a45;
    background: #ffffff;
}

.price-separator {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Apply Filters Button */
.btn-apply-filters {
    background: #008a45;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.btn-apply-filters:hover {
    background: #006e37;
    box-shadow: 0 4px 14px rgba(0, 138, 69, 0.25);
}

/* Middle Column: Interactive Leaflet Map */
.map-column-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    min-height: 640px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

#searchMap {
    width: 100%;
    height: 100%;
    min-height: 640px;
    z-index: 1;
}

.floating-search-area-btn {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    z-index: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floating-search-area-btn:hover {
    background: #f8fafc;
    border-color: #008a45;
    color: #008a45;
}

/* Bottom Map Legend */
.map-legend-bar {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 30px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 500;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.legend-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
}

.legend-chip i {
    font-size: 0.82rem;
}

.legend-chip.dc-fast i { color: #008a45; }
.legend-chip.ac-charger i { color: #10b981; }
.legend-chip.coming-soon i { color: #f59e0b; }
.legend-chip .cluster-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #008a45;
    display: inline-block;
}

.btn-fullscreen-map {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    z-index: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-fullscreen-map:hover {
    border-color: #008a45;
    color: #008a45;
}

/* Custom Marker Styling */
.map-marker-pin {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #008a45;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(0, 138, 69, 0.4);
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.map-marker-pin.orange-pin {
    background: #f59e0b;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
}

.map-marker-pin:hover {
    transform: scale(1.15);
}

.map-marker-cluster {
    background: #008a45;
    color: #ffffff;
    border-radius: 50%;
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px rgba(0, 138, 69, 0.4);
    cursor: pointer;
}

/* Right Column: Stations List Container */
.stations-list-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stations-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.stations-found-count {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}

.stations-found-count span {
    color: #008a45;
}

.sort-by-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
}

.sort-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: #0f172a;
    font-weight: 600;
    outline: none;
    background: #ffffff;
    cursor: pointer;
}

.stations-scroll-container {
    max-height: 580px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 2px;
}

.stations-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.stations-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Station Card Component */
.station-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    position: relative;
}

.station-item-card:hover {
    border-color: #008a45;
    box-shadow: 0 8px 20px rgba(0, 138, 69, 0.08);
    transform: translateY(-2px);
}

.station-item-card.active-card {
    border-color: #008a45;
    background: #f0fdf4;
}

.station-card-top-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.station-brand-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.station-title-meta {
    flex-grow: 1;
    min-width: 0;
}

.station-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
}

.station-name-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-card-arrow {
    color: #94a3b8;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.station-item-card:hover .station-card-arrow {
    color: #008a45;
    transform: translateX(3px);
}

.station-address-text {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-card-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.station-badges-list {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.badge-tag-pill {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-tag-pill.badge-featured {
    background: #dcfce7;
    color: #008a45;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.65rem;
}

.badge-tag-pill.badge-dc {
    background: #f0fdf4;
    color: #008a45;
    border: 1px solid #bbf7d0;
}

.badge-tag-pill.badge-ac {
    background: #f0fdf4;
    color: #10b981;
    border: 1px solid #bbf7d0;
}

.badge-tag-pill.badge-connector {
    background: #f1f5f9;
    color: #334155;
}

.badge-tag-pill.badge-power {
    background: #e0f2fe;
    color: #0284c7;
}

.station-distance-pill {
    font-size: 0.82rem;
    font-weight: 700;
    color: #008a45;
    white-space: nowrap;
}

.station-card-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.station-amenities-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.85rem;
}

.station-amenities-icons i {
    transition: color 0.2s;
}

.station-amenities-icons i:hover {
    color: #008a45;
}

.station-rating-box {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}

.station-rating-box i {
    color: #f59e0b;
    font-size: 0.82rem;
}

.station-rating-box .review-count {
    color: #64748b;
    font-weight: 500;
    font-size: 0.76rem;
}

/* Load More Button */
.btn-load-more-stations {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-load-more-stations:hover {
    border-color: #008a45;
    color: #008a45;
    background: #f0fdf4;
}

/* Bottom 4 Features Row */
.bottom-features-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.feature-strip-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.feature-strip-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0fdf4;
    color: #008a45;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    border: 1px solid #bbf7d0;
}

.feature-strip-text h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
}

.feature-strip-text p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

/* Leaflet Popup Styling */
.custom-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.popup-station-card {
    padding: 8px 10px;
    font-family: inherit;
}

.popup-station-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 3px 0;
}

.popup-station-addr {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 8px;
}

.popup-badges {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.popup-btn-detail {
    display: block;
    text-align: center;
    background: #008a45;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .search-grid-layout {
        grid-template-columns: 260px 1fr 320px;
        gap: 12px;
    }
    .bottom-features-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .search-grid-layout {
        grid-template-columns: 1fr;
    }
    .map-column-container {
        min-height: 450px;
    }
    #searchMap {
        min-height: 450px;
    }
    .stations-scroll-container {
        max-height: 480px;
    }
    .bottom-features-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .search-input-group-box {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-search-main, .btn-location-main {
        width: 100%;
        justify-content: center;
    }
}
