
/*
Primary color: blue (#12418d)
Secondary color: linen
 */

:root {
    --primary-color: #12418d;
    --primary-text-color: #212121;
    --main-background-color: #f7f5ed;
    --cards-background-color: white;
    --hover-secondary-color: #a4e4c8;
    --main-body-font-color: var(--primary-color);
    --secondary-color-hover: #a4d4e4;
    --cards-hover-color: #a4e4c8;
    --button-hover-color: #0f3a7a;
    --mobile-border-color: #ccc;
    --search-button-color: var(--main-background-color);
}
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #272757; /* Midnight blue is my favourite blue */
        --primary-text-color: #212121;
        --main-background-color: #333739;
        --cards-background-color: #181a1b;
        --hover-secondary-color: #212121;
        --main-body-font-color: #9e9da1;
        --secondary-color-hover: #57737e;
        --cards-hover-color: #164b3a;
        --button-hover-color: #2f2f7d;
        --mobile-border-color: #454545;
        --search-button-color: var(--cards-background-color);
    }
    .mobile-hint img {
        filter: invert(1);
    }
}
#locate-button {
    position: absolute;
    bottom: 60px;
    right: 2px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: background-color 0.3s ease;
}
#locate-button:hover {
    background-color: var(--button-hover-color);
}

#locate-hint {
    position: absolute;
    bottom: 110px; /* Adjust based on button position */
    right: 4px;
    background-color: white;
    color: black;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

#locate-hint::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

#locate-hint.show {
    opacity: 1;
    transform: translateY(0);
}

.Vollkorn {
   font-family: "Vollkorn", serif;
   font-optical-sizing: auto;
   font-weight: 400;
   font-style: normal;
}
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.contact-icon-container{
    margin: 0;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
}

.pharmacy-icon{

}
.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 2rem;
    padding: 0 1rem 0 0.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 1rem 0 0;
}

.contact-button:hover {
    background-color: var(--button-hover-color);
    transform: scale(1.05);
}

.contact-button:active {
    transform: scale(0.98);
}

.logo-icon{
    max-width: 2rem;
    margin: 1rem;
}
.card .card-image{
    max-width: 2.5rem;
    margin: 1.5rem  ;
}
.card {
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    font-family: Roboto, "Vollkorn", serif;
    border-radius: 10px;
    background-color: var(--cards-background-color);
    cursor: pointer;
    padding: 0.5rem 0;
}
.filter-card {
    display: none;
    margin: 1.5rem 0;
    align-items: center;
    font-family: Roboto, "Vollkorn", serif;
    border-radius: 10px;
    background-color: var(--cards-background-color);
    cursor: pointer;
    padding: 0.5rem 0;
}
.card.filters{
    display: none;
}

.card-list{
    font-family: Wotfard, Arial, sans-serif;
    list-style: none;
    padding: 0;
    height: 100%;
    min-width: 25vw;
    overflow: auto;
    margin: 0;
}
/*
    these two are for hiding the scrollbar in different browsers
*/
.card-list{
    -ms-overflow-style: none; /* Edge */
    scrollbar-width: none;    /* Firefox */
}
.card-list::-webkit-scrollbar{
    display: none;            /* Chromium */
}

.page-info {
    font-family: Roboto, "Vollkorn", serif;
    color: var(--main-body-font-color);
    max-width: 75vw;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}


.card-text{
    max-width: 50rem;
}
.logo-container{
    display: flex;
    flex-direction: row;
    align-items: center;
}
.header-container{
    display: flex;
    flex-direction: row;
    align-items: center;
}
.banner-text-container{
    display: flex;
    flex-direction: column;
    max-width: fit-content;
}

.contact-icon{
    width: 2rem;
    margin: 1rem;
}
.contact-button-icon{
    width: 1.5rem;
    margin: 0.5rem;
}
.banner-font{
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: Roboto, Verdana, serif;
    margin: 0;
}
.navbar {
    border-bottom: black solid 1px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--primary-color);
    height: 11vh;
    z-index: 1000;
}

.search-form {
    display: flex;
    border: 1px solid transparent;
    border-radius: 150px;
    overflow: hidden;
    width: 300px;
    align-self: center;
    background-color: var(--search-button-color);
}

.main-container{
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-evenly;
    padding: 1.5rem 0;
    background-color: var(--main-background-color);
    flex: 1;
    flex-wrap: wrap;
}
.left-container{
    display: flex;
    flex-direction: column;
    color: var(--main-body-font-color);
    font-family: Roboto, "Vollkorn", serif;
    max-width: 35vw;
    max-height: 85vh;
    align-items: stretch;
}
.list-header{
    display: flex;
    flex-direction: column;
    align-self: center;
    justify-content: center;
}
.left-header{
    align-self: center;
    font-size: 2rem;
    margin: 0.5rem 0;
}
.bottom-header{
    font-size: 1.5rem;
}
.spinner {
    width: 25px;
    height: 25px;
}


.lighter{
    font-weight: lighter;
    margin: 1rem 0;
}
.bolder{
    font-weight: bolder;
}
.list-header h4{
    text-align: center;
}
.card p{
    margin: 0.3rem 0;
}
.filter-card span{
    margin: 0.3rem 0;
}
.card h4, h5{
    margin: 0.1rem 0;
}

.card h4{
    font-size: 1.2rem;
}

.search-form input {
    flex: 1;
    border: none;
    padding: 10px 10px 10px 15px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--main-body-font-color);
    background-color: var(--search-button-color);
);
    outline: none;
}
.search-form-container{
    margin: 1rem;
}
.search-form button {
    background: transparent;
    margin: 0 .5rem;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    cursor: pointer;
    width: 15%;
}

.search-form button:hover {

    background-color: var(--secondary-color-hover);
}

#map{
    width: 35%;
    border: transparent solid 1.5px;
    border-radius: 20px;
}
.footer{
    display: flex;
    justify-content: space-around;
    flex:1;
    background-color: var(--primary-color);
    padding: 1rem;
    font-size: 0.8rem;
}
.footer-text{
    margin: 0;
    color: white;
}

.link-container {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: underline;
    color: #03bf55;
}
.link-container:hover {
    color: #029645;
}
a{
    text-decoration: none;
    color: #03bf55;
}
.mobile-hint{
    display: none;
}
.search-icon {
    display: none;
}
#mobile-search {
display: none;
}
#link-header{
    display: block;
    max-width: none;
}
#small-screen-link{
    display: none;
}
@media (max-width: 768px) {
    .bottom-header{
        text-align: center;
    }
    #link-header{
        max-width: 3rem;
    }
    .search-form input{
        min-width: 0;
    }
    .search-form button{
        width: 5vh;
        flex-shrink: 0;
    }
    .search-form {
        flex:1;
        border-radius: 150px;
        overflow: hidden;
        width: 300px;
        align-self: center;
        background-color: var(--search-button-color);
        max-height: 5vh;
        border-color: var(--mobile-border-color);
    }
    .search-icon { /*legacy toggle for search icon */
        display: none;
        width: 2rem;
        margin: 1rem;
        cursor: pointer;
    }

    .navbar {
        align-items: stretch;
    }

    .header-container {
        flex-grow: 1;
        justify-content: space-between;
        padding: 0 1rem;
    }

    .search-form-container {
        display: none;
    }

    #mobile-search {
        display: flex;
        position: absolute;
        top: 10vh;
        left: 0;
        right: 0;
        width: 80%;
        margin: 0 auto;
        background: transparent;
        padding: 10px;
        border-radius: 5px;
        z-index: 900;
        opacity: 0;
        transform: translateY(-65%);
        transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    }


    #mobile-search.visible {
        display: flex; /* Show the element */
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }

    .main-container {
        flex-direction: column;
        align-items: center;
        width: 100vw;
        padding: 0;
    }

    .list-header {
        text-align: center;
    }

    #map {
        width: 100vw;
        height: 75vh;
        border-radius: 0;
    }

    .left-container {
        width: 100%;
        padding: 0;
        max-width: none;
    }

    div .mobile-hint {
        display: flex;
        align-items: center;
        flex-direction: column;
        margin: 0;
    }

    ul {
        margin: 0;
    }

    .mobile-hint {
        display: block;
        margin: .5rem;
        width: 100%;
    }

    .mobile-hint h3 {
        margin: 0;
        padding: 0 1rem;
    }

    .mobile-hint img {
        max-width: 2rem;
    }

    .card-list {
        max-height: 50vh;
        min-width: 90%;
    }

    .contact-button-icon {
        min-width: 15px;
    }

    .contact-button {
        width: 35vw;
        min-width: 175px;
        font-size: 1rem;
    }
    .contact-button.filters{
        margin: 0.5rem;
    }
    .filter-card{
        display: flex;
    }
    .filter-card.filters{
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #link{
        min-width: 235px;
    }
    #locate{
        min-width: 300px;
    }

}
@media (max-width: 460px) {
    .contact-icon {
        display: none;
    }
}

@media (max-width: 395px){
    .link-container{
        display: none;
    }
    #small-screen-link{
        display: flex;
    }
}