/* App Fabs Wrapper */
.nearby-fabs-wrapper {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* App Store FAB */
.app-fabs-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-right: 50px; /* Nudge the icons further to the left */
}
.app-fab {
    background: #000;
    color: white;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.2s;
    border: 1px solid #333;
}
.app-fab:hover {
    background: #222;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}
.app-fab i {
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.app-fab i.fa-google-play {
    font-size: 20px; /* Reduce size to match apple icon */
    margin-left: 3px; /* Adjusted optical centering for smaller size */
}
.app-fab i.fa-apple {
    margin-bottom: 2px; /* Optical centering for apple icon */
}


/* Floating Action Button (FAB) */
.nearby-fab {
    background: linear-gradient(135deg, var(--theme-color1), color-mix(in srgb, var(--theme-color1) 75%, white));
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(var(--theme-color1-rgb), 0.4);
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ensure modal is above everything */
.modal {
    z-index: 10000 !important;
}

.modal-backdrop {
    z-index: 9998 !important;
    /* Just below modal but above FAB/Wrapper */
}

.nearby-fab:hover {
    background-color: #2b1669;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: white;
    text-decoration: none;
}

.nearby-fab i {
    font-size: 20px;
}

/* Modal Styling */
#nearbyHospitalsModal .modal-header {
    background: linear-gradient(135deg, var(--theme-color1), color-mix(in srgb, var(--theme-color1) 75%, white));
    color: white;
}

#nearbyHospitalsModal .modal-title {
    font-weight: 700;
}

#nearbyHospitalsModal .close {
    color: white;
    opacity: 0.8;
}

#nearbyHospitalsModal .filter-section {
    background: rgba(var(--theme-color1-rgb, 2, 173, 212), 0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(var(--theme-color1-rgb, 2, 173, 212), 0.1);
    border-left: 5px solid var(--theme-color1);
}

.btn-nearby-search {
    background-color: var(--theme-color1);
    color: white !important;
    font-weight: 700;
    padding: 8px 25px;
    margin-left: 10px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.btn-nearby-search:hover {
    background-color: var(--theme-color1-dark, #2b1669);
    filter: brightness(0.9);
    transform: translateY(-1px);
}

#nearby-results {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar */
#nearby-results::-webkit-scrollbar {
    width: 6px;
}

#nearby-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#nearby-results::-webkit-scrollbar-thumb {
    background: var(--theme-color1);
    border-radius: 10px;
    opacity: 0.5;
}

#nearby-results::-webkit-scrollbar-thumb:hover {
    background: #2b1669;
}

.hospital-result-card {
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 15px;
    align-items: center;
    cursor: pointer;
    background: white;
}

.hospital-result-card:hover {
    border-color: var(--theme-color1);
    background: #fffcfc;
}

.hospital-result-card .img-box {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.hospital-result-card .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hospital-result-card .info-box {
    flex-grow: 1;
}

.hospital-result-card .name {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.hospital-result-card .meta {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.distance-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Loader Styling */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner-border-custom {
    color: var(--theme-color1);
    width: 3rem;
    height: 3rem;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: calc(100% - 100px);
    background: white;
    z-index: 10001;
    border-radius: 0 0 10px 10px;
    border: 1px solid #ddd;
    max-height: 250px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f8f8;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: rgba(var(--theme-color1-rgb, 2, 173, 212), 0.06);
}

.autocomplete-item i {
    width: 20px;
}