:root {
    --building-color: #FF9800;
    --house-color: #0288D1;
    --shop-color: #7B1FA2;
    --warehouse-color: #558B2F;
}

/*
* Optional: Makes the sample page fill the window.
*/

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Roboto, sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    background-color: #0f181c;
    padding: 5px;
    overflow: hidden;
}

.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #16232a;
    border-radius: 5px;
}

/*
   * location styles in unhighlighted state.
   */
/* .location {
    align-items: center;
    background-color: red;
    border-radius: 50%;
    color: #263238;
    display: flex;
    font-size: 14px;
    gap: 15px;
    height: 30px;
    justify-content: center;
    padding: 4px;
    position: relative;
    position: relative;
    transition: all 0.3s ease-out;
    width: 30px;
}

.location::after {
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 15px solid red;
    content: "";
    height: 0;
    left: 50%;
    position: absolute;
    top: 83%;
    transform: translate(-50%, 0);
    transition: all 0.3s ease-out;
    width: 0;
    z-index: 1;
}

.location .icon {
    align-items: center;
    display: flex;
    justify-content: center;
    color: #FFFFFF;
    background-color: red;
}

.location .icon svg {
    height: 20px;
    width: auto;
} */

.location {
    background: transparent;
    color: white;
    /* Remove any unwanted background */
    border: none;
    padding: 0;
    margin: 0;
    overflow: visible;
}

.location .icon-container {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 5px;
    /* margin: 0 0 -150px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.location .details {
    display: none;
    flex-direction: column;
    flex: 1;
}

.location .details .cat-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.location .address {
    color: #c5c5c5;
    font-size: 12px;
    margin-bottom: 5px;
    margin-top: 5px;
}

.location .phone, .location .days {
    font-size: 12px;
    margin-bottom: 5px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.location .features {
    align-items: flex-end;
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.location .features>div {
    align-items: center;
    /* background: #F5F5F5; */
    /* border-radius: 5px; */
    /* border: 1px solid #ccc; */
    display: flex;
    font-size: 11px;
    gap: 5px;
    /* padding: 5px; */
}

.location .features .icon, .location .phone .icon, .location .days .icon {
    font-size: 18px;
}

/*
   * location styles in highlighted state.
   */
.location.highlight {
    background-color: #284756;
    border-radius: 8px;
    box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.2);
    /* height: 80px; */
    padding: 8px 15px 0;
    width: auto;
    min-width: 230px;
}

.location.highlight::after {
    border-top: 15px solid #FFFFFF;
    top: 100%;
}

.location.highlight .details {
    display: flex;
}

.location.highlight .icon svg {
    width: 50px;
    height: 50px;
}

.location .bed {
    color: #FFA000;
}

.location .bath {
    color: #03A9F4;
}

.location .size {
    color: #388E3C;
}

/*
   * House icon colors.
   */
.location.highlight:has(.fa-house) .icon {
    color: var(--house-color);
}

.location:not(.highlight):has(.fa-house) {
    background-color: var(--house-color);
}

.location:not(.highlight):has(.fa-house)::after {
    border-top: 9px solid var(--house-color);
}

/*
   * Building icon colors.
   */
.location.highlight:has(.fa-building) .icon {
    color: var(--building-color);
}

.location:not(.highlight):has(.fa-building) {
    background-color: var(--building-color);
}

.location:not(.highlight):has(.fa-building)::after {
    border-top: 9px solid var(--building-color);
}

/*
   * Warehouse icon colors.
   */
.location.highlight:has(.fa-warehouse) .icon {
    color: var(--warehouse-color);
}

.location:not(.highlight):has(.fa-warehouse) {
    background-color: var(--warehouse-color);
}

.location:not(.highlight):has(.fa-warehouse)::after {
    border-top: 9px solid var(--warehouse-color);
}

/*
   * Shop icon colors.
   */
.location.highlight:has(.fa-shop) .icon {
    color: var(--shop-color);
}

.location:not(.highlight):has(.fa-shop) {
    background-color: var(--shop-color);
}

.location:not(.highlight):has(.fa-shop)::after {
    border-top: 9px solid var(--shop-color);
}

/* Apply to cluster icons or any text */
.antialiased-text {
    font-smooth: always;
    /* Standard property */
    -webkit-font-smoothing: antialiased;
    /* WebKit browsers (Chrome, Safari) */
    -moz-osx-font-smoothing: grayscale;
    /* macOS Firefox */
    text-rendering: optimizeLegibility;
    /* Improves font appearance */
}

.wh-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 15px;
}

.time-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.time-container .wh-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.time-container .wh-icon.open {
    background-color: #2ddd22;
}

.time-container .wh-icon.closed {
    background-color: red;
}

.time-container .text-open {
    color: #2ddd22;
}

.time-container .text-closed {
    color: red;
}

.no-locations {
    color: #FFFFFF;
}


/* Mobile Portrait Layout */
@media (max-width: 1000px) and (orientation: portrait) {
    .container {
        flex-direction: column-reverse !important;
        height: auto;
    }

    #map {
        flex: 1;
        height: 300px;
        margin-right: 5px !important;
    }

    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto;
        /* Enable horizontal scrolling */
        white-space: nowrap;
        height: 240px !important;
    }

    .sidebar .card-container {
        display: flex;
        flex-wrap: nowrap;
    }

    .sidebar .card-container .card {
        display: inline-block;
        text-align: left;
        min-width: 250px;
    }
}

/* Mobile Landscape Layout */
@media (max-width: 1000px) and (orientation: landscape) {

    /* hide button directions */
    .directions {
        display: none !important;
    }

    .container {
        flex-direction: column-reverse !important;
        height: auto;
    }

    #map {
        flex: 1;
        height: 67vh;
        margin-right: 0 !important;
    }

    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto;
        white-space: nowrap;
        height: 33vh !important;
        overflow-y: hidden;
    }

    .sidebar .card-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-y: hidden !important;
    }

    .sidebar .card-container .card {
        display: inline-block;
        text-align: left;
        min-width: 250px;
        /* height: 165px; */
        margin-bottom: 0 !important;
        padding: 8px 0;
    }

    .sidebar .card-container .card .card-header {
        padding: 0px 16px 0;
    }

    .sidebar .card-container .card .card-header .category {
        font-size: 16px;
        line-height: 20px;
    }

    .sidebar .card-container .card .card-header .address {
        font-size: 12px;
        line-height: 17px;
    }

    .sidebar .card-container .card .card-content * {
        font-size: 12px;
        line-height: 14px;
    }
}