body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #e0e0e0; /* Light gray background for the page */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 420px; /* Approximate iPhone 12/13 width */
    min-height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    overflow: hidden;
    padding-bottom: 70px; /* Space for bottom navigation bar */
}

/* Status Bar Placeholder */
.status-bar-placeholder {
    background-color: #ffffff; /* Match pricesStyle.css */
    color: #000; /* Match pricesStyle.css */
    padding: 5px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px; /* Match pricesStyle.css */
    font-weight: normal; /* Reset from previous 500 if needed, or rely on specificity */
    height: 30px; /* Match pricesStyle.css */
    position: relative; /* Ensure notch is positioned correctly */
}
.status-bar-placeholder .time { /* Added to match pricesStyle.css */
    font-weight: 500;
}
.notch-placeholder { /* Match pricesStyle.css */
    width: 10px; 
    height: 10px; 
    background-color: #000;
    border-radius: 50%; 
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 10px; 
}
.status-bar-placeholder .status-icons { /* Match pricesStyle.css (no specific flex styles) */
}
.status-icons i { /* Added to match pricesStyle.css */
    margin-left: 8px;
}

/* Header */
.app-header {
    background-color: #fff;
}
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}
.main-header h1 {
    font-size: 1.05em;
    font-weight: 600;
    margin: 0;
    color: #1c1c1e;
    text-align: center;
    flex-grow: 1;
}
.header-icon {
    font-size: 1.2em;
    color: #444;
}

/* Search Section */
.search-section {
    padding: 10px 15px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.search-bar {
    display: flex;
    align-items: center;
    background-color: #f0f2f5;
    border-radius: 10px; /* Less rounded than image, but common */
    padding: 10px 15px;
    margin-bottom: 15px;
}
.search-bar input {
    flex-grow: 1;
    border: none;
    background-color: transparent;
    outline: none;
    font-size: 0.95em;
    color: #333;
}
.search-bar input::placeholder {
    color: #8e8e93;
}
.search-icon {
    color: #8e8e93;
    font-size: 0.95em;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px; /* Space for scrollbar if it appears */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.filter-buttons::-webkit-scrollbar { /* WebKit */
    display: none;
}
.filter-btn {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    color: #555;
    padding: 7px 14px;
    border-radius: 18px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn.active {
    background-color: #e6f5e7; /* Light green */
    color: #34c759; /* Brighter green for text */
    border-color: #d0e8d2;
    font-weight: 600;
    box-shadow: 0 0 2px rgba(52, 199, 89, 0.5); /* Add subtle glow for active filters */
}

/* Map */
#map {
    height: 320px; /* Adjust as needed */
    width: 100%;
    background-color: #2c2c2e; /* Dark map background */
}

/* Station List */
.station-list-container {
    background-color: #fff;
    padding: 20px 18px 15px 18px; 
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin-top: -20px; /* Pull up over the map */
    position: relative;
    z-index: 10; /* Ensures this container is on top of the map div */
    flex-grow: 1;
    overflow-y: auto;
}
.pull-handle-bar {
    width: 40px;
    height: 5px;
    background-color: #d1d1d6;
    border-radius: 2.5px;
    margin: 12px auto;
}
.station-list-container h2 {
    font-size: 1.05em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #1c1c1e;
}

#station-list .station-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}
#station-list .station-item:last-child {
    border-bottom: none;
}
.station-info {
    flex-grow: 1;
}
.station-info .tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.station-tag {
    display: flex;
    align-items: center;
    border: 1px solid;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.station-tag .tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}
.station-tag .tag-name {
    display: inline;
}
.station-tag.shrink {
    padding: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    justify-content: center;
    border: none;
}
.station-tag.shrink .tag-dot {
    margin-right: 0;
}
.station-tag.shrink .tag-name {
    display: none;
}
.station-item h3 {
    font-size: 0.95em;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #1c1c1e;
}
.station-item .details {
    font-size: 0.8em;
    color: #636366;
    margin-bottom: 6px;
}
.station-item .prices {
    font-size: 0.8em;
}
.station-item .prices span {
    margin-right: 10px;
    text-decoration: underline;
    color: #888;
    font-weight: 500;
}
.station-item .prices span:last-child {
    margin-right: 0;
}
.station-item .arrow-icon {
    color: #c7c7cc;
    font-size: 0.9em;
    margin-left: 10px;
}
#station-list .station-item.highlighted {
    background-color: #f0fff0; /* Very light green */
}

/* Custom Leaflet Marker for Charging Stations */
.station-marker-icon {
    width: 30px; /* Pin width */
    height: 42px; /* Pin height */
    position: relative;
}
.station-marker-icon .pin-shape {
    width: 100%;
    height: 100%;
    background-color: white;
    border: 1.5px solid #d0d0d0;
    border-radius: 50% 50% 50% 7% / 50% 50% 50% 7%; /* Teardrop shape */
    transform: rotate(-45deg);
    position: absolute;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
.station-marker-icon .icon-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg); /* Counter-rotate and center */
    margin-top: -3px; /* Fine-tune centering of icon on the fatter part */
}
.station-marker-icon .fa-charging-station {
    color: #34c759; /* Green icon */
    font-size: 16px;
}

/* Custom Leaflet Marker for User Location */
.user-location-marker-icon {
    width: 36px;
    height: 20px; /* Adjust to aspect ratio of car icon or desired appearance */
    display: flex;
    justify-content: center;
    align-items: center;
}
.user-location-marker-icon .fa-car {
    color: #34c759; /* Green car */
    font-size: 24px; /* Car icon size */
    filter: drop-shadow(0px 1px 1px rgba(0,0,0,0.5));
}

/* Helper class */
.hidden {
    display: none !important;
}

/* Reservation Panel Styles */
#reservationView {
    padding-top: 10px; /* Space from pull handle if it's still visible or for header */
}

.reservation-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.back-arrow-btn {
    background: none;
    border: none;
    font-size: 1.3em; /* Slightly larger arrow */
    color: #333;
    padding: 5px 10px 5px 0; /* More padding on right for easier tap */
    cursor: pointer;
    margin-right: 10px;
}

#reservationStationName {
    font-size: 1.2em; /* Prominent station name */
    font-weight: 600;
    color: #34c759; /* Green color as in image */
    margin: 0;
}

.station-address-details {
    font-size: 0.85em;
    color: #636366;
    margin-bottom: 20px;
    padding-left: 35px; /* Align with station name text if arrow takes space */
}
.station-address-details i {
    margin-left: 5px;
}


.balance-availability-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px; /* Small horizontal padding */
}

.user-balance-info {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    font-weight: 500;
}
.user-balance-info i {
    font-size: 1.2em;
    color: #333;
    margin-right: 8px;
}

.station-availability-info {
    font-size: 0.9em;
    color: #333;
    display: flex;
    align-items: center;
}
.station-availability-info #spotsAvailable {
    font-weight: 600;
    margin-right: 5px;
}
.availability-dot {
    width: 10px;
    height: 10px;
    background-color: #34c759; /* Green dot */
    border-radius: 50%;
    margin-left: 8px;
}

.reservation-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    justify-content: space-between; /* Ensure proper spacing */
}

.date-picker-input,
.time-picker-input,
.reservation-fee-info {
    background-color: #f0f2f5; /* Light grey background for inputs */
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 0.9em;
    color: #333;
    border: 1px solid #e0e0e0;
}

.date-picker-input {
    flex-basis: 35%; /* Adjust based on content */
    text-align: center;
}

.time-picker-input {
    flex-basis: 28%; /* Adjust based on content */
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer; /* Indicates it's interactive */
    text-decoration: none; /* Remove underline */
    gap: 5px; /* Add spacing between time and arrow */
    padding: 10px; /* Ensure the entire area is clickable */
}

.time-picker-input i {
    font-size: 0.8em;
    color: #888;
}

.reservation-fee-info {
    width: calc(100% - 26px); /* Adjust width to account for padding */
    margin: 0 auto 20px auto; /* Center horizontally and add bottom margin */
    text-align: center;
    border: 1px solid #e0e0e0; /* Match input fields slightly */
    background-color: #f0f2f5;
    padding: 12px; /* Adjust padding for better appearance */
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
}

.reserve-button-main {
    width: 100%;
    background-color: #2c2c2e; /* Dark button as in image */
    color: white;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 1.15em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}
.reserve-button-main:hover {
    background-color: #444;
}

.header-icon-link { /* Added for consistency in header icon usage */
    text-decoration: none;
}

/* Ensure pull handle is only for list view if needed, or adjust overall panel height */
#stationListView ~ .pull-handle-bar { /* This might not be necessary if pull handle is generic */
    /* display: block; */
}
#reservationView ~ .pull-handle-bar {
    /* display: none; */ /* Or adjust logic based on visibility */
}

/* Custom Time Picker */
.custom-time-picker select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f0f2f5;
    color: #333;
    font-size: 0.9em;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
}

.custom-time-picker button {
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.2s;
}

.custom-time-picker button:hover {
    background-color: #2c2c2e;
}

#reservationTags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
