/* ==========================================================================
   RESET AND BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Map page specific styles */
body.map-page {
    display: flex;
    flex-direction: row;
    background-color: transparent;
    min-height: 100vh;
}

/* ==========================================================================
   MAP CONTAINER STYLES
   ========================================================================== */

#map-container {
    height: 100vh;
    flex: 1;
    position: relative;
    z-index: 1;
}

#map-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ==========================================================================
   ADVANCED MARKER STYLES
   ========================================================================== */

.custom-map-marker {
    width: 60px;
    height: 75px;
    display: block;
    pointer-events: auto;
}

.custom-map-marker svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
    transition: filter 0.2s ease, transform 0.2s ease;
}

.custom-map-marker.is-selected svg {
    filter: drop-shadow(0 4px 12px rgba(239, 64, 66, 0.35));
    transform: translateY(-2px);
}

.user-location-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(66, 133, 244, 0.2);
    border: 2px solid #4285F4;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.35);
    transform: translate(0, 50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-location-marker__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4285F4;
}

.cluster-bubble {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 999px;
    background: #000;
    border: 2px solid #fff;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
    transform: translate(0, 50%);
    cursor: pointer;
    user-select: none;
}

.cluster-bubble--lg {
    min-width: 52px;
    height: 52px;
    font-size: 16px;
    padding: 0 12px;
}

/* Google Maps styling overrides */
.gm-style {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gm-style-cc,
.gmnoprint,
.gm-style-cc+div {
    display: none !important;
}

/* ==========================================================================
   SIDE PANEL STYLES
   ========================================================================== */

#side-panel {
    position: relative;
    width: 32vw;
    min-width: 320px;
    max-width: 620px;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem 0rem 1rem;
    flex-shrink: 0;
}

.panel-header {
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.2;
    color: #F6F3F0;
    text-align: left;
    margin: 0 0 2rem 0;
    flex-shrink: 0;
    cursor: default;
}

/* ==========================================================================
   TOGGLE COMPONENT STYLES
   ========================================================================== */

.toggle-container {
    background-color: #FFFFFF;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    flex-shrink: 0;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    min-height: 3.5rem;
}

.toggle-options {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    position: relative;
}

.toggle-option {
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.2;
    color: #000000;
    text-align: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    user-select: none;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 400;
}

.toggle-option.active {
    font-weight: 700;
    border-bottom: 2px solid #F26722;
    margin-bottom: -2px;
}

.toggle-option:hover {
    background-color: #f8f9fa;
}

/* Details popup specific toggle styles */
#details-popup .toggle-container {
    padding: 0.75rem;
    min-height: 2.5rem;
    margin-bottom: 1rem;
}

#details-popup .toggle-option {
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
    line-height: 1.1;
}


/* ==========================================================================
   SEARCH COMPONENT STYLES
   ========================================================================== */

.search-container {
    pointer-events: auto;
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    position: relative;
    padding: 0;
    min-height: 3.5rem;
}

.search-container gmp-place-autocomplete,
.search-container gmpx-place-autocomplete {
    flex: 1;
    width: 100%;
}

.search-container gmp-place-autocomplete::part(input),
.search-container gmpx-place-autocomplete::part(input) {
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.25;
}

.search-container gmp-place-autocomplete::part(container),
.search-container gmpx-place-autocomplete::part(container) {
    background: transparent;
    border: 1px solid rgba(246, 243, 240, 0.65);
    border-radius: 6px;
    color: #F6F3F0;
}

.search-container gmp-place-autocomplete::part(input)::placeholder,
.search-container gmpx-place-autocomplete::part(input)::placeholder {
    color: #333333;
    opacity: 1;
}

.search-container gmp-place-autocomplete::part(container):focus-within,
.search-container gmpx-place-autocomplete::part(container):focus-within {
    border-color: #ffffff;
}

/* ==========================================================================
   LOADING INDICATOR STYLES
   ========================================================================== */

.loading-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.75);
    border-radius: inherit;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-indicator.is-visible {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(246, 243, 240, 0.3);
    border-top-color: #F6F3F0;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: #F6F3F0;
    font-weight: 500;
}

/* ==========================================================================
   RESULTS CONTAINER STYLES
   ========================================================================== */

.results-container {
    flex: 1;
    overflow-y: auto;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem;

    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(246, 243, 240, 0.5) rgba(246, 243, 240, 0.1);
}

.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: rgba(246, 243, 240, 0.1);
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
    background: rgba(246, 243, 240, 0.5);
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: rgba(246, 243, 240, 0.7);
}

.overflow-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background-color: #FDDCCF;
    border: 1px solid #FF5F1F;
    border-radius: 8px;
    color: #000000;
    font-size: 14px;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

.overflow-message__icon-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #FF5F1F;
    color: #FDDCCF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.overflow-message__icon {
    font-size: 0.95rem;
}

.overflow-message__text {
    flex: 1;
}

.overflow-message__text strong {
    font-weight: 700;
}

/* ==========================================================================
   LOCATION CARD STYLES
   ========================================================================== */

.location-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 0.9rem 1.25rem;
    padding-right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 540px;
    border: 2px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.location-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.location-card.selected {
    border: 2px solid #EF4042;
    box-shadow: 0 3px 12px rgba(239, 64, 66, 0.15);
}

.location-card.has-distance {
    padding-right: 3.75rem;
}

.location-card-chevron {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #C1C1C1;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s ease;
}

.location-card:hover .location-card-chevron,
.location-card.selected .location-card-chevron {
    color: #0077CD;
}

.location-top-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
}

.location-icon {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.location-icon[src*="Icon-ATM.svg"] {
    width: 2rem;
    height: 2rem;
    background-color: #000000;
    border-radius: 50%;
    padding: 0.125rem;
}

.location-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.location-title {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.25;
    color: #000000;
    margin: 0 0 0.35rem 0;
}

.service-notice-indicator {
    color: #F5A623;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.status-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.05rem;
}

[id^="branch-status"].status-line {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.status-copy {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.45rem;
    white-space: nowrap;
    min-width: 0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.closed,
.status-indicator.unavailable {
    background-color: #EF4042;
}

.status-indicator.available,
.status-indicator.open {
    background-color: #009C6C;
}

.status-text {
    font-weight: 500;
    font-size: 13px;
    line-height: 1.3;
    color: inherit;
}

[id^="branch-status"].closed-status .status-text {
    color: #EF4042;
}

[id^="branch-status"].open-status .status-text {
    color: #009C6C;
}

[id^="atm-status"].available-status .status-text,
[id^="atm-status"].available-status .status-time {

    color:  #009C6C;
}

[id^="atm-status"].available-status .status-time {

    color: #666666;
}

[id^="atm-status"].closed-status .status-text {
    color: #EF4042;
}

[id^="atm-status"].closed-status .status-time {
    color: #666666;
}

[id^="atm-status"].unavailable-status .status-text {
    color: #EF4042;
}

[id^="atm-status"] .status-time::before {
    content: "•";
    display: inline-block;
    margin-right: 0.25rem;
    color: inherit;
}

.status-time {
    font-weight: 400;
    font-size: 13px;
    line-height: 1.3;
    color: #666666;
}

[id^="branch-status"] .status-time::before {
    content: "•";
    display: inline-block;
    /* margin: 0 0.35rem 0 0.25rem; */
    margin-right: 0.3rem;
    color: inherit;
}

.location-address {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-top: 0.5rem;
}

.address-text {
    font-weight: 400;
    font-size: 13px;
    line-height: 1.35;
    color: #666666;
    flex: 1;
}

.services-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-top: 1px solid #e8e5e2;
    padding-left: 0;
    justify-content: space-around;
}

.service-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.2rem;
    flex: 0 1 auto;
}

.service-item i {
    font-size: 14px;
    color: #666666;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-text {
    font-weight: 400;
    font-size: 11px;
    line-height: 1.2;
    color: #666666;
    white-space: nowrap;
}

.action-links-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-top: 0;
    padding-top: 0.75rem;
    border-top: 1px solid #e8e5e2;
    padding-left: 0;
    justify-content: space-between;
    align-items: center;
}

.action-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: #0066CC;
    transition: color 0.2s ease;
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 0.4rem 0.6rem;
}

.action-link:hover {
    color: #0052A3;
}

.action-link i {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-text {
    font-weight: 500;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.distance-badge {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    font-size: 13px;
    color: #666666;
    font-weight: 400;
}

/* ==========================================================================
   DETAILS POPUP STYLES
   ========================================================================== */

#details-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 33vw;
    min-width: 400px;
    max-width: 600px;
    height: 100vh;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    padding: 1.2rem 1.25rem 0 1.25rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#details-popup:not(.hidden) {
    transform: translateX(0);
}

#details-popup.hidden {
    transform: translateX(-100%);
    pointer-events: none;
    display: block;
}

#details-popup > *:not(.details-section) {
    flex-shrink: 0;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-title {
    font-size: 25px;
    margin: 0;
}

#details-close {
    border: none;
    background: #000;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.service-notice-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0rem;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    background-color: #FFF9E6;
    border: 2px solid #F5C542;
    border-radius: 8px;
}

.service-notice-box.hidden {
    display: none;
}

.service-notice-icon {
    color: #F5A623;
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.service-notice-text {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.details-section h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 0.75rem;
}

.details-address {
    font-size: 14px;
}

#details-popup a.details-address {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0052A3;
    text-decoration: none;
    font-weight: 600;
}

#details-popup a.details-address .directions-icon {
    font-size: 1rem;
    color: inherit;
}

#details-popup a.details-address .details-address-text {
    line-height: 1.4;
}

#details-popup a.details-address:hover,
#details-popup a.details-address:focus {
    text-decoration: underline;
}

#details-popup a.details-address:focus {
    outline: none;
}

#details-popup a.details-address:focus-visible {
    outline: 2px solid #0052A3;
    outline-offset: 2px;
}

#details-popup a.details-address.disabled {
    color: #666666;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
    opacity: 0.75;
}

#details-popup .details-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    user-select: text;
    -webkit-user-select: text;
}

/* ==========================================================================
   BRANCH ATMS SECTION STYLES
   ========================================================================== */

.branch-atms-section {
    margin: 0.75rem 0 0.5rem 0;
}

.branch-atms-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #000000;
}

.branch-atms-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.branch-atm-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    line-height: 1.4;

}

.branch-atm-item .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.branch-atm-item .status-indicator.available {
    background-color: #00AA13;
}

.branch-atm-item .status-indicator.closed {
    background-color: #D32F2F;
}

.branch-atm-item .atm-location-type {
    font-weight: 600;
    color: #000000;
    min-width: 70px;
    margin-right: 0.5rem;
}

.branch-atm-item .atm-hours {
    color: #666666;
}

.details-section {
    border-radius: 16px 16px 0 0;
    background-color: #F6F3F0;
    width: calc(100% + 2.5rem);
    margin: 0.75rem -1.25rem 0 -1.25rem;
    padding: 0.85rem 1.25rem 2.25rem 1.25rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   HOURS GRID STYLES
   ========================================================================== */

.hours-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.75rem 0;
}

.hours-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.day-name {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    color: #000000;
    flex: 0 0 120px;
    text-align: left;
}

.hours {
    font-weight: 400;
    font-size: 14px;
    line-height: 1.3;
    color: #666666;
    text-align: left;
    flex: 1;
}

.hours-row.current-day .day-name,
.hours-row.current-day .hours {
    font-weight: bold;
    color: black;
}

/* ==========================================================================
   BUTTON STYLES
   ========================================================================== */

.details-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin: 0.75rem 0 0.65rem;
    flex-wrap: wrap;
}

.details-button {
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
    color: #FFFFFF;
    background-color: #000000;
    border: none;
    border-radius: 4px;
    padding: 0.65rem 1.35rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

.details-button.secondary {
    background-color: #0066CC;
}

.details-button:hover {
    background-color: #f7f3f0;
    border: 1px solid #000000;
    color: #000000;
    transform: translateY(-1px);
}

.details-button.secondary:hover {
    background-color: #0052A3;
}

.details-button:active {
    transform: translateY(0);
    background-color: #D1521A;
}

.details-button.secondary:active {
    background-color: #00478F;
}

.details-button:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.details-button i {
    font-size: 14px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   LINK STYLES
   ========================================================================== */

.holiday-hours-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #0F78FF;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    margin: 0.65rem 0;
    padding: 0.4rem 0;
    transition: color 0.2s ease;
}

.holiday-hours-link:hover {
    color: #0D6BE6;
}

.holiday-hours-link i {
    font-size: 12px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   SERVICES GRID STYLES
   ========================================================================== */

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.services-grid .service-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 calc(50% - 0.5rem);
    min-width: 0;
}

.services-grid .service-item i {
    font-size: 16px;
    color: #666666;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.services-grid .service-text {
    font-weight: 400;
    font-size: 13px;
    line-height: 1.2;
    color: #666666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hidden {
    display: none;
}

/* ==========================================================================
   MOBILE MAP SEARCH STYLES
   ========================================================================== */

.mobile-map-search {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 2500;
    display: none;
}

.mobile-map-search .search-container {
    background-color: #FFFFFF;
    border: 1px solid #e8e5e2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-map-search .search-input {
    color: #333333;
}

.mobile-map-search .search-input::placeholder {
    color: #999999;
    opacity: 1;
}

.mobile-map-search .clear-button {
    background-color: #e8e5e2;
}

/* ==========================================================================
   MOBILE VIEW TOGGLE STYLES
   ========================================================================== */

.mobile-view-toggle {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #313130;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn {
    flex: 1;
    max-width: 150px;
    height: 40px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.view-toggle-btn i {
    font-size: 1rem;
}

.view-toggle-btn.active {
    background-color: #0052A3;
    border-color: #0052A3;
    color: #FFFFFF;
    font-weight: 600;
}

.view-toggle-btn:hover:not(.active) {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.view-toggle-btn:active {
    transform: scale(0.98);
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Location card adjustments for medium desktop widths */
@media (min-width: 1025px) and (max-width: 1299px) {
    /* Adjust services container for better wrapping on medium screens */
    .services-container {
        gap: 1rem;
    }

    /* Shrink action links so they don't overlap in the narrower side panel */
    .action-links-container {
        gap: 0.25rem;
    }

    .action-link {
        gap: 0.3rem;
        padding: 0.4rem 0.4rem;
    }

    .action-link i {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }

    .action-text {
        font-size: 11px;
    }
}

/* Tablet styles: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    #side-panel {
        width: clamp(360px, 42vw, 420px);
        min-width: 360px;
    }

    .services-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1rem;
        justify-items: center;
    }

    .services-container .service-item {
        min-width: 0;
        justify-content: center;
    }

    .services-container .service-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .action-links-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 1rem;
    }

    .action-link {
        width: 100%;
        gap: 0.375rem;
        padding: 0.4rem 0.6rem;
        justify-content: center;
    }

    .action-link:only-child {
        grid-column: 1 / -1;
    }

    .action-link i {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    .action-text {
        font-size: 12px;
    }
}

/* Mobile styles: < 768px */
@media (max-width: 767px) {
    /* Stack services vertically on very small screens for compact layout */
    .services-container {
        gap: 0.5rem;
    }
    
    /* Keep action links inline on small screens until space runs out */
    .action-links-container {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
    
    .action-link {
        flex: 0 1 auto;
    }

    /* Show mobile view toggle bar */
    .mobile-view-toggle {
        display: flex;
    }

    /* Adjust side panel for mobile - back to overlay mode */
    #side-panel {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        min-width: unset;
        max-width: unset;
        height: calc(100vh - 60px);
        border-radius: 0;
        padding: 1.5rem;
        z-index: 2000;
        flex-shrink: unset;
    }

    /* Panel header adjustments for mobile */
    .panel-header {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Map container adjustments for mobile - back to absolute positioning */
    #map-container {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 60px);
        display: none;
        flex: unset;
        /* Hidden by default on mobile */
    }

    /* Show/hide based on active view */
    body.map-page[data-mobile-view="list"] #side-panel {
        display: flex;
    }

    body.map-page[data-mobile-view="list"] #map-container {
        display: none;
    }

    body.map-page[data-mobile-view="map"] #side-panel {
        display: none;
    }

    body.map-page[data-mobile-view="map"] #map-container {
        display: block;
    }

    body.map-page[data-mobile-view="map"] .mobile-map-search {
        display: block;
    }

    /* Details popup adjustments for mobile - Bottom Sheet */
    #details-popup {
        position: fixed;
        top: auto;
        left: 0;
        bottom: 0;
        transform: translateY(100%);
        width: 100%;
        min-width: unset;
        max-width: none;
        height: 90vh;
        max-height: 90vh;
        /* border-radius: 16px 16px 0 0; */
        z-index: 3500;
        /* Above mobile toggle and both views */
        padding: 1.25rem 1.25rem 0 1.25rem;
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    #details-popup:not(.hidden) {
        transform: translateY(0);
    }

    #details-popup.hidden {
        transform: translateY(100%);
        pointer-events: none;
        display: block;
    }

    /* Add visual handle at top of bottom sheet */
    /* #details-popup::before {
        content: '';
        position: absolute;
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background-color: #d1d1d1;
        border-radius: 2px;
    } */

    /* Details header with better mobile spacing */
    #details-popup .details-header {
        margin-bottom: 1rem;
        margin-top: 1rem;
    }

    #details-popup .details-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    /* Better touch target for close button */
    #details-popup #details-close {
        padding: 0.5rem;
        font-size: 1.25rem;
        min-width: 24px;
        min-height: 24px;
    }

    /* Better mobile button sizing */
    #details-popup .details-buttons-container {
        gap: 0.6rem;
    }

    #details-popup .details-button {
        font-size: 0.8rem;
        padding: 0.75rem 1rem;
        min-height: 44px;
        flex: 1 1 48%;
        min-width: 0;
    }

    #details-popup .details-button i {
        font-size: 0.9rem;
    }

    /* Adjust details section padding for mobile */
    #details-popup .details-section {
        width: calc(100% + 2.5rem);
        margin: 0.75rem -1.25rem 0 -1.25rem;
        padding: 0.85rem 1.25rem 2rem 1.25rem;
    }

    /* Better mobile address spacing */
    #details-popup .details-address {
        font-size: 0.725rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    /* Adjust location cards for mobile - Mobile-first design */
    .location-card {
        max-width: unset;
        padding: 0.7rem 0.9rem;
    }

    /* Improve location title readability on mobile */
    .location-title {
        font-size: 0.98rem;
        line-height: 1.25;
        margin-bottom: 0.25rem;
    }

    /* Better spacing for location content */
    .location-content {
        gap: 0.15rem;
    }
    
    /* Improve status text sizing */
    .status-text,
    .status-time {
        font-size: 0.7rem;
    }

    /* Better address text sizing */
    .address-text {
        font-size: 0.6rem;
        line-height: 1.3;
    }

    /* Adjust services container for mobile - Better touch targets */
    .services-container {
        gap: 0.35rem;
        flex-wrap: wrap;
        margin-top: 0.35rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0;
    }

    .service-item {
        min-height: 0;
        padding: 0.05rem 0;
        align-items: center;
    }

    .service-text {
        font-size: 0.7rem;
    }

    /* Action links with better touch targets */
    .action-links-container {
        margin-top: 0;
        padding-top: 0.5rem;
        gap: 0.35rem;
    }

    .action-link {
        min-height: 36px;
        padding: 0.35rem 0.5rem;
        margin: -0.35rem;
        gap: 0.25rem;
    }

    .action-link i {
        font-size: 0.85rem;
    }

    .action-text {
        font-size: 0.7rem;
    }

    /* Distance badge with better mobile positioning */
    .distance-badge {
        font-size: 0.75rem;
        top: 0.85rem;
        right: 0.85rem;
    }

    /* Adjust results container scrolling */
    .results-container {
        padding: 0.65rem;
        gap: 0.55rem;
    }

    .services-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
        margin-top: 0.2rem;
    }
}

/* Desktop styles: >= 768px */
@media (min-width: 768px) {

    /* Hide mobile view toggle on desktop */
    .mobile-view-toggle {
        display: none;
    }

    /* Ensure side panel and map are visible on desktop with flex layout */
    body.map-page {
        display: flex;
        flex-direction: row;
    }

    #side-panel {
        display: flex !important;
        position: relative;
        flex-shrink: 0;
    }

    #map-container {
        display: block !important;
        position: relative;
        flex: 1;
    }
}

/* ==========================================================================
   ENHANCED UI STATES
   ========================================================================== */

/* Empty State Styling */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.3s ease-in;
}

.empty-state i {
    font-size: 3.5rem;
    color: #C1C1C1;
    opacity: 0.6;
}

.empty-state p:first-of-type {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.5rem 0;
}

.empty-state p:last-of-type {
    color: #999;
    font-size: 0.95rem;
    margin: 0.25rem 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Skeleton Loading Screens */
.skeleton-card {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 0.9rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for keyboard navigation */
.location-card:focus-visible,
.action-link:focus-visible,
.toggle-option:focus-visible {
    outline: 2px solid #EF4042;
    outline-offset: 2px;
}

/* Error Message Styling */
.error-message {
    padding: 1rem;
    margin: 0.75rem;
    background: linear-gradient(135deg, #fee 0%, #fcc 100%);
    border: 1px solid #f44336;
    border-radius: 6px;
    color: #c62828;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.1);
    animation: slideIn 0.3s ease-out;
}

.error-message i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-message span {
    flex: 1;
}
