:root {
    --place-card-height: 295px;
    --place-card-image-height: 250px;
}

#map {
    height: 100vh;
    width: 100%
}

html,
body {
    height: 100vh;
    /* overflow-y: hidden; */
    margin: 0;
    padding: 0;
}

/* This is the body overlay for elements */
#body-overlay {
    /* background-color: rgba(0, 0, 0, 0.4); */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
}

/* This allows all the body elements to be clickable */
#body-overlay * {
    pointer-events: auto;
}

#right-overlay {
    pointer-events: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align items to the right */
    z-index: 1;
    padding-top: 1rem;
    padding-right: 1rem;
}

#right-overlay > div {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between elements */
    pointer-events: auto; /* Ensure buttons remain clickable */
}

.shopping-cart-btn {
    border-radius: 20px;
    background-color: rgba(var(--bs-white-rgb), 1);
    color: rgba(var(--bs-primary-rgb), 1);
    text-decoration: none;
    padding: 0.5rem 1rem;
    width: 50%;
    min-width: 20px;
    min-width: px;
    box-shadow: var(--bs-box-shadow);
    display: inline-block;
    transition: all 0.4s ease;
}

.shopping-cart-btn:hover, .shopping-cart-btn:focus {
    background-color: var(--bg-muted);
    color: rgba(var(--bs-primary-rgb), 1);
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1rem rgba(0, 0, 0, 0.2)
}

.customer-service-btn {
    border-radius: 20px;
    background-color: rgba(var(--bs-white-rgb), 1);
    color: rgba(var(--bs-primary-rgb), 1);
    text-decoration: none;
    padding: 0.5rem 1rem;
    width: 30%;
    min-width: 20px;
    min-width: px;
    box-shadow: var(--bs-box-shadow);
    display: inline-block;
    transition: all 0.4s ease;
}

.customer-service-btn:hover, .customer-service-btn:focus {
    background-color: var(--bg-muted);
    color: rgba(var(--bs-primary-rgb), 1);
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1rem rgba(0, 0, 0, 0.2)
}

.subcategory-filter {
    background-color: var(--bs-warning);
    display: flex;
    align-items: center;
    padding: 0.5rem;
    padding-left: 0;
    color: var(--bs-white)
}

.subcategory-filter>.subcategory-icon {
    width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcategory-filter > label {
    cursor: pointer;
    display: flex;
    flex-grow: 1;
}

.subcategory-filter > label > input[type="checkbox"] {
    margin-left: auto;
}

#left-overlay {
    pointer-events: none;
    width: clamp(450px, 38vw, 500px);
    margin-left: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
    padding-top: 1rem;
}

#left-overlay * {
    pointer-events: auto;
}

#left-overlay nav {
    display: none;
}

.left-panel {
    border-radius: 20px;
    background-color: rgba(var(--bs-white-rgb), 1);
    padding: 1.5rem;
    transition: all 0.75s ease-out;
    box-shadow: var(--bs-box-shadow);
    overflow: hidden;
    transform: translateX(-100%);
    opacity: 0;
	margin-bottom: 0.5rem;
}

#main-panel.open {
    transform: translateX(0);
    opacity: 1;
}

#left-extra-panel {
    position: absolute;
    bottom: 0;
    height: calc(100% - 210px); /* 210px is the offset top of the main panel */
    width: clamp(450px, 38vw, 500px);
    z-index: 1;
    padding: 2rem;
    overflow-y: auto;
	margin-bottom: 0.5rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
}

#left-extra-panel.open {
    transform: translateX(0);
    opacity: 1;
} 
#left-extra-panel-back-btn:hover {
    background-color: var(--bg-muted);
}

/* Pull-up bar handle (only visible on mobile) */
#pull-up-bar {
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 5px;
    margin: 8px auto;
    display: none;
}
@media (min-width: 768px) {
    .mobile-stack {
        display: none;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    #menu-items {
        /* display: none; */
        flex-direction: column;
        background: white;
        position: fixed;
        width: 50%;
        right: 0;
        top: 60px;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    .mobile-stack {
        display: block;
    }
    .desktop-stack {
        display: none;
    }

    #mobile-menu-toggle {
        position: fixed;
        right: 4%;
    }
    #search-container {
        position: fixed;
        width: 80%;
    }
    
    #menu-items a,
    #menu-items #customer-service,
    #menu-items #shopping-cart {
        width: 48%;
        justify-content: flex-start;
        margin-bottom: 10px;
    }

    #menu-items a,
    #profile-btn {
        width: 100%;
        justify-content: flex-start;
    }
    
    #shopping-cart { order: 1; }
    #customer-service { order: 2; }
    #profile-btn { order: 3; }
    #login-btn { order: 4; }

    #search-container {
        padding-right: 5px;
        height: 40px !important;
    }

    .bubble-menu-container {
        position: fixed;
        top: 8%;
        left: 6%;
        margin: 0;
        width: 90% !important;
    }

    button[data-menu="trips"],
    button[data-menu="my-plan"] {
        width: 48%;
        height: 48%;
        white-space: nowrap;
    }
    
    .orSpacing {
        display: none !important;
    }


    /* Right overlay, profile, cart, etc. */
    #right-overlay > div {
        display: none;
    }

    #mobile-menu-toggle {
    display: block;
    }

    .mobile-menu a {
    display: block;
    margin-bottom: 10px;
    }

    #right-overlay {
        /* border: 2px solid green; */
    }

    #initial-search-modal, .modal-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        width: 100%;
        /* border: 2px solid orange; */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    /* Left pane to mimic Google maps */
    #main-panel, #left-extra-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 8%;
        margin-bottom: -15px;
        /* border: 2px solid rgb(158, 0, 26); */
        padding-top: 5px !important;
    }

    #left-extra-panel {
        width: auto;
    }

    #panel-drag-area {
        height: 40px;
        cursor: grab;
        touch-action: none;
    }

    #pull-up-bar {
        width: 40px;
        height: 5px;
        background: #ccc;
        border-radius: 5px;
        margin: 8px auto;
        display: block;
    }
    

     /* Make modal full-width and height for mobile */
    #login-form .modal-dialog {
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
    }

    #login-form .modal-content {
        border-radius: 0;
        height: 100%;
        overflow-y: auto;
    }

    /* Stack columns vertically */
    #signinAndSignupContainer .row {
        flex-direction: column;
    }

    #signinAndSignupContainer .col-md-6 {
        width: 100%;
        border: none !important;
        padding: 1rem;
    }

    /* Adjust iframe and social login button widths */
    .g_id_signin iframe,
    .fb-login-button iframe {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ReCaptcha scaling */
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: top left;
    }

    /* Smaller font sizes */
    #login-form h5,
    #login-form label,
    #login-form .form-check-label,
    #login-form .modal-footer p,
    #login-form .text-center,
    #login-form a {
        font-size: 0.9rem !important;
    }

    /* Adjust padding/margin for smaller screen */
    #login-form .modal-body,
    #login-form .modal-footer {
        padding: 1rem;
    }

    .modal-header {
        padding: 0.5rem 1rem;
    }

    /* Fix container padding */
    #signinAndSignupContainer.container-fluid,
    #forgotPasswordContainer.container-fluid {
        padding: 0;
    }

    .mobile-stack {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-stack .input-group {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .mobile-stack .input-group-text {
        width: 3rem;
        justify-content: center;
        border-right: none;
        border-radius: 0.375rem 0 0 0.375rem;
    }

    .mobile-stack .form-control {
        flex: 1;
        border-radius: 0 0.375rem 0.375rem 0;
    }

    .mobile-stack .btn {
        width: 100%;
        border-radius: 0.375rem;
    }

    .mobile-stack .btn i {
        margin-right: 0.5rem;
    }

    /* Target your collapsible filter container */
    #initial-filters-collapse {
        max-height: 300px;
        overflow-y: auto;
        padding: 1rem;
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 0.375rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .modal-body {
        overflow-y: auto;
        max-height: calc(100vh - 150px); 
    }

    #initial-filters-collapse * {
        max-width: 100%;
    }

    #initial-filters-collapse > *:not(:last-child) {
        margin-bottom: 0.75rem;
    }

    /* Cart */
    .cart-item {
        align-items: flex-start !important;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .cart-item-controls .decrease-btn,
    .cart-item-controls .increase-btn,
    .cart-item-controls .remove-item-btn {
        font-size: 1.2rem;
    }

}

@media (max-height: 705px) {
    .bubble-menu-container {
        position: fixed;
        top: 10%;
        left: 0;
        margin: 0;
        width: 100% !important;
    }
}

#places-list-container, #trips-list-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    gap: 1rem;
}

#places-list-container:hover, #trips-list-container:hover {
    overflow-y: auto;
}

#search-container {
    height: 52px;
    margin-bottom: 0.5rem;
}

#search-container input:active, 
#search-container input:focus {
  outline: none !important;
  box-shadow: none!important;
}

#my-plan-counter {
    position: absolute;
    top: -5px;
    right: 0;
    height: 20px;
    width: 20px;
    z-index: 1;
    overflow: hidden;

    border-radius: 50%;
    background-color: rgba(var(--bs-info-rgb), 1);
    display: flex;
    justify-content: center;
    align-items: center;

    color: rgba(var(--bs-white-rgb), 1);
}

.icon-circle {
    width: 36px;
    height: 36px;
    background-color: var(--bs-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    border: 3px solid var(--bs-white);
}

.icon-circle i {
    font-size: 18px;
    color: var(--bs-white);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.00) 0%,
            rgba(0, 0, 0, 0.10) 70%,
            rgba(0, 0, 0, 0.95) 100%);
    pointer-events: none;
    transition: all 0.4s ease;
}

.place-card-image-container {
    height: var(--place-card-image-height);
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.place-card-image-container > img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.place-card {
    transition: all 0.4s ease;
    border-radius: 20px;
}

.place-card:hover {
    cursor: pointer;
    background-color: var(--bg-muted);
}

.place-card:hover .place-card-image-container .image-overlay {
    background-color: rgba(255, 255, 255, 0.1);
}

.place-card:hover .place-card-image-container > img {
    transform: scale(1.05);
}

.place-card-bottom {
    padding: 1rem;
}

/* .place-card-bottom .category-icon-container { */
/*     flex-basis: 10%; */
/*     display: flex; */
/*     align-items: center; */
/* } */
/**/
/* .place-card-bottom .info-container { */
/*     display: flex; */
/*     flex-direction: column; */
/*     justify-content: center; */
/* } */
/**/
/* .info-container .footer { */
/*     margin-top: 0.25rem; */
/*     max-width: 40ch; */
/*     line-height: 1.2rem; */
/* } */
.info-container {
    display: flex;
    align-items: center;
}

.place-card-bottom .info-container {
    display: flex;
}

.place-card-top {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 75px;
}

.place-card-top .share-icon-container {
    flex-basis: 10%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.info-container .footer {
    margin-top: 0.25rem;
    max-width: 40ch;
    line-height: 1.2rem;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-button {
    display: none;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.1);
}

/* For Internet Explorer and Edge */
.scrollable-element {
    -ms-overflow-style: scrollbar;
}

.speech-bubble {
	position: relative;
	border-radius: .4em;
    box-shadow: (--bs-box-shadow-sm)!important;
}

.speech-bubble:after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 0;
	border: 10px solid transparent;
	border-top-color: white;
	border-bottom: 0;
	border-left: 0;
	margin-left: -45%;
	margin-bottom: -10px;
}

.place-map-icon {
    transition: 0.5s;
}

.place-map-icon > i {
    color: var(--bs-primary);
    transition: 0.5s;
}

.place-map-icon > i.added {
    color: var(--bs-warning);
}

.place-map-icon:hover {
    transform: scale(1.2);
}

.place-map-icon:hover > i {
    color: var(--bs-warning);
}

.extra-panel-image-container {
    position: relative;
    width: 100%;
    height: var(--place-card-height);
    border-radius: 20px;
    max-height: 250px;
}

.extra-panel-image-container > img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}


.rounded-edge {
    height: 80px;
    aspect-ratio: 3/2;
    clip-path: ellipse(85% 100% at 50% 0%);
}

.trip-tab-option {
    text-decoration: none;
    text-align: center;
    padding-top: .5rem;
    padding-bottom: .5rem;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    width: 100%;
    color: white;
    background-color: #cbcbcb;
}

.trip-tab-option:not(.active):hover {
    filter: brightness(1.1);
}

.trip-tab-option.active {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-white-rgb),var(--bs-text-opacity));
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-warning-rgb),var(--bs-bg-opacity));
}

#center-overlay {
    height: fit-content;
    width: auto;
    margin-top: 1rem;
    margin-left: 35px;
    margin-right: 35px;
}

.bubble-menu-container {
    margin-bottom: 0.5rem;
    z-index: 100;
    background-color: rgba(var(--bs-white-rgb), 1);
    padding: 1rem;
    box-shadow: var(--bs-box-shadow);
    border-radius: 20px;
}

.arrow-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    transition: color 0.4s ease;
}

.icon-btn i {
    font-size: 1.5em;
    color: var(--bs-primary);
    line-height: 1;
}

.item-text {
    font-weight: bold;
    color: rgb(91, 91, 91);
    font-size: 0.8rem;
    margin-top: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.arrow-btn i {
    margin-left: 5px;
    color: rgb(217, 217, 217);
    transition: transform 0.3s ease;
}

.bubble-menu {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-10%);
    background-color: var(--bs-white);
    min-width: 160px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

.dropdown-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-wrap: nowrap;
}

.dropdown-checkbox:hover {
    background-color: var(--bs-light);
}

.dropdown-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.dropdown-content a {
    color: black;
    padding: 5px 5px;
    text-decoration: none;
    display: block;
    transition: background-color 0.4s ease;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    border-radius: 10px;
}

.dropdown-title {
    padding-top: 8px;
    font-weight: 500;
    color: rgb(186, 186, 186);
    height: fit-content;
    margin-bottom: 0;
}

.login-btn {
    border-radius: 20px;
    background-color: rgba(var(--bs-white-rgb), 1);
    color: rgba(var(--bs-primary-rgb), 1);
    text-decoration: none;
    padding: 0.5rem 1rem;
    width: 100%;
    min-width: 150px;
    box-shadow: var(--bs-box-shadow);
    display: inline-block;
    transition: all 0.4s ease;
}

.login-btn:hover, .login-btn:focus {
    background-color: var(--bg-muted);
    color: rgba(var(--bs-primary-rgb), 1);
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1rem rgba(0, 0, 0, 0.2)
}

.related-trip-card {
    border-radius: 20px;
    background-color: #e5f2fe; 
    border: var(--bs-border-width) var(--bs-border-style) #71b3f2;
}

.related-trip-card img {
    height: var(--place-card-image-height);
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.view-group-on-map {
    padding: 0.5rem;
    transition: all 0.4s ease;
    border-radius: var(--bs-border-radius);
}

.view-group-on-map:hover {
    background-color: var(--bg-muted);
}

.circle-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 2.5rem;
    border-radius: 50%;
    position: relative;
    background-color: white;
}

.circle-icon i {
    position: absolute;
    z-index: 1;
}