/*!
 * Copyright (c) 2025 Brian Walczak
 * All rights reserved.
 *
 * This source code is licensed under the MIT License found in the
 * LICENSE file in the root directory of this source tree.
*/

html, body {
    overscroll-behavior: none; /* prevent slide up to refresh on iOS */
}

.search-container {
    position: absolute;
    max-width: min(340px, calc(100vw - 24px));
    margin: 12px;
    z-index: 9999;
    top: 0px;
    left: 0px;
}

.search-input {
    width: 100%;
    padding: 14px 44px;
    border-radius: 16px;
    outline: none;
    font-size: 15px;
    box-sizing: border-box;
    background: rgb(25, 25, 25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.2s ease;
}

.search-input:focus + .search-icon {
    color: rgba(255, 255, 255, 0.7);
}

.search-results {
    position: fixed;
    height: 0%;
    left: 0;
    right: 0;
    background: rgb(25, 25, 25);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    max-height: 80%;
    z-index: 9999;
    overflow-y: auto;
    user-select: none;
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.search-results.visible {
    bottom: 0;
}

/* Custom Scrollbar */
.search-results::-webkit-scrollbar {
    width: 6px; /* Scrollbar width */
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02); /* Track background */
    width: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25); /* Darker color on hover */
}

.search-results::-webkit-scrollbar-corner {
    background: transparent;
}

.draggable-area {
    width: 100%;
    height: 36px;
    cursor: ns-resize;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, rgba(25, 25, 25, 1), rgba(25, 25, 25, 0.98));
    backdrop-filter: blur(10px);
}

.handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.draggable-area:hover .handle {
    background: rgba(255, 255, 255, 0.3);
}

.location {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease;
}

.location:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.get-directions {
    color: lightgreen;
    cursor: pointer;
}

.close-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px !important;
    color: white;
    cursor: pointer;
}