﻿/*adjustments*/


/* ===========================
   Shared / existing styles
   =========================== */

.navbar.searchNavbar {
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.searchNavbar .sidebarlinks {
    border-bottom-right-radius: 0;
    padding-bottom: 0rem;
}

.facetbar {
    width: 17rem;
    height: 100%;
    background: #f5f5f5;
    /* border: 1px solid #ddd; */
    flex: 0 0 auto;
    z-index: 2;
    padding: 2rem .25rem 2rem .25rem;
    margin-top: -1px;
    box-shadow: 3px 4px 3px rgba(0, 0, 0, 0.15);
    border-bottom-right-radius: 3rem;
    margin-bottom: 2rem;
}

#facetContainer {
    /* padding: 1rem; */
}

    #facetContainer .applyFilter {
        display: flex;
    }

    #facetContainer .titleCaps {
        padding-left: .75rem !important;
        color: #333;
        font-family: 'Vazirmatn';
        font-size: 1.35rem;
    }

    /* Section title */
    #facetContainer > h4 {
        margin-bottom: .5rem;
        padding-left: 0;
        border-bottom: 1px solid #ccc;
    }

    /* "Applied filters" row */
    #facetContainer .form-label {
        font-variant: all-petite-caps;
        color: #777;
        padding-left: 1.1rem !important;
    }

#sf-facet-clear-all-btn {
    font-size: .8rem;
}

/* Pills */
#applied-filters li {
    background: #d8e0e5 !important;
    color: #333;
    border-radius: .25rem;
    padding: .35rem .05rem .1rem .5rem !important;
    font-size: .75rem;
    width: auto;
    letter-spacing: .01rem;
    box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 5px inset;
}

    #applied-filters li:hover {
        background: #d9e2ea !important;
    }

/* Individual facet group */
#facetContent:has(*) {
    padding: .5rem 1rem;
}

#facetContent h5 {
    /* margin-top: 1.25rem; */
    /* margin-bottom: .5rem; */
    border-bottom: 1px solid #ccc;
    font-weight: bold;
    color: #333;
    padding-top: 1rem;
}

/* Checkbox row */
#facetContent li {
    display: flex !important;
    align-items: center;
    padding: .5rem 0;
}

#facetContent input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Label text */
#facetContent label {
    padding: .2rem 0 0 .25rem;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
}

/* Count text */
#facetContent span {
    font-size: .7rem;
    color: #777 !important;
}

/* Show More / Less */
#facetContent button.btn-link {
    margin-top: .25rem;
    /* font-size: .75rem; */
    padding: 0;
}


/*End Facet Bar*/

.searchBody {
    /* flex: 0 0 75%; */
    /* padding: 0 2em 1em 1em; */
}

    .searchBody .searchResultTop {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        /* border-bottom: 1px solid #ccc; */
    }

        .searchBody .searchResultTop h3 {
            border-bottom: 0;
        }

        .searchBody .searchResultTop .sortFilter {
            display: flex;
            flex-direction: row;
        }

            .searchBody .searchResultTop .sortFilter .form-label {
                align-self: center;
                flex: 1 0 auto;
                padding: .75rem 1rem 0 1rem;
                font-size: 1.2rem;
            }

            .searchBody .searchResultTop .sortFilter .form-select {
                width: 100%;
                padding: 0.375rem 1rem;
                font-size: 1.2rem;
                color: #333;
                min-width: 15rem;
            }

    .searchBody .searchResultData {
        margin-top: .5rem;
        padding-top: 1rem;
        border-top: 1px solid #ccc;
    }

        .searchBody .searchResultData .resultListItem {
            margin: 1rem .25rem 1.5rem .25rem;
        }

        .searchBody .searchResultData .resultListBody {
            display: flex;
            flex-direction: row;
            padding: 1rem .25rem;
            gap: .5rem;
        }

            .searchBody .searchResultData .resultListBody h3, .searchBody .searchResultData .resultListBody .resultLink {
                color: #333;
                font-family: 'Vazirmatn';
            }

        .searchBody .searchResultData .filterIcon {
            font-size: 1.75rem;
            margin: 0;
            padding: 0 .5rem;
            color: #003b8d;
        }

        .searchBody .searchResultData .searchUrlText {
            font-size: .9rem;
        }

.ccSearchBoxWrapper {
    width: 75%;
    margin: 0 auto;
}

.ccSearchBox,
.ccSearchBoxModal {
    display: flex;
    padding: .25rem 0 .5rem 0;
    gap: 1rem;
    flex: 1 0 100%;
    justify-content: center;
    width: 100%;
}

    .ccSearchBoxModal .d-flex {
        flex: 1 0 auto;
        background: #fff;
        border-radius: 5rem;
        /* border: 1px solid #7489a7; */
        overflow: hidden;
        box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.25);
        padding: .25rem;
        align-items: center;
    }

    .ccSearchBoxModal ul.border.bg-body.list-unstyled.position-absolute {
        top: 2.8rem;
        width: 100%;
        box-shadow: 3px 5px 8px rgba(0 0 0 / .5);
        height: auto;
        max-height: 12rem;
        font-size: .85rem;
        z-index: 2;
        overflow: hidden;
    }

    .ccSearchBox .btn:first-of-type,
    .ccSearchBoxModal .btn:first-of-type {
        /* background-color: #fff!important; */
        border: 0;
        border-radius: 0rem;
        padding: 0.25rem 1rem 0 .25rem;
        color: #333;
        font-weight: bold;
        letter-spacing: 1px;
        border-radius: 5rem;
        height: 95%;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        line-height: normal;
        background: #dbdbdb;
        margin-right: .1rem;
        /* border: 1px solid #95a4b1; */
    }

    .ccSearchBox .btn-primary:focus,
    .ccSearchBoxModal .btn-primary:focus {
        border-color: var(--cc-darkBlue);
        box-shadow: 0 0 0 0.25rem #77a;
    }

    .ccSearchBox button::before,
    .ccSearchBoxModal button::before {
        content: "\e802";
        font-family: "ccicons";
        margin-right: .4em;
        font-size: 1.25rem;
        /* color: #fff; */
        /* background: #435979; */
        height: 2.5rem;
        width: 2.5rem;
        border-radius: 5rem;
        padding-top: .5rem;
    }

    .ccSearchBox .form-control,
    .ccSearchBoxModal .form-control {
        /* border: 1px solid #333; */
        font-size: 1.2em;
        border-radius: 5rem;
        padding: .25rem .25rem .1rem .75rem;
        background: none;
        border: 0;
    }

.searchModalWrap {
    width: 100%;
    height: 70vh;
}

.searchModal {
    width: 100%;
    height: 100%;
    border: none;
}

.ccSearchLoading {
    min-height: 12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
}

.ccSearchLoadingSpinner {
    width: 2.25rem;
    height: 2.25rem;
    border: 3px solid #d9d9d9;
    border-top-color: #555;
    border-radius: 50%;
    animation: ccSearchSpin 0.8s linear infinite;
}

.ccSearchLoadingText {
    font-size: 1rem;
    line-height: 1.4;
}

.ccSearchLoadError {
    min-height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

@keyframes ccSearchSpin {
    to {
        transform: rotate(360deg);
    }
}

#ccMainSection > div.ccSearchBoxModal.all > div {
    flex: 0 1 100% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0
}

/* ===========================
   Search page only
   =========================== */
#ccMainSection .ccSearchBoxModal > div {
    margin-bottom: 3rem;
    border: 2px solid #919fa7;
    box-shadow: none;
}

#ccMainSection .ccSearchBox .btn:first-of-type, #ccMainSection .ccSearchBoxModal .btn:first-of-type {
    background: #3b617b;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 400;
}
/* ===========================
   Modal layout / background
   =========================== */
.ccSearchModalBlock {
    max-width: 52rem;
    width: 100%;
    overflow: hidden;
    /*border-radius: 1.25rem; added per judge feedback*/
}

.ccSearchModalBody {
    background: #e1e2e4; /* light gray like screenshot */
    padding: 2.5rem 1.5rem 2rem 1.5rem;
    overflow: visible; /* let suggestions overflow */
}

.ccSearchModalContent {
    max-width: 95%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Root for Sitefinity search box widget inside the modal */
.ccSearchBoxModal-root {
    position: relative;
    z-index: 2; /* keep above generic modal body content */
}

/* Suggestions dropdown on top of filter bar */
.sf-search-suggestions,
.cc-search-suggestions {
    position: relative; /* or absolute depending on SF markup */
    z-index: 3;
}

/* ===========================
   Filter tabs (ALL / etc.)
   =========================== */

.ccSearchFilterBar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* spacing between tab labels */
    align-items: flex-end;
    font-size: .95rem;
    justify-content: center;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #bbb;
    width: 90%;
}

/* Base tab: text-only */
.ccSearchFilterButton {
    border: none;
    background: transparent;
    padding: 0.35rem 0.9rem;
    color: #4c4c4c;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    padding-top: .75rem;
    letter-spacing: 1px;
}

    .ccSearchFilterButton:not(.is-active):hover {
        color: #000;
        background: var(--cc-medGrey);
    }

    /* Active tab: dark rectangle with white text (like ALL) */
    .ccSearchFilterButton.is-active {
        background: #557d99;
        color: #fff;
        border-radius: 0px;
    }

#applied-filters {
    padding: 0;
    margin: 0;
}

    #applied-filters:has(*) {
        padding: .5rem .5rem .25rem 1rem;
        margin-bottom: .2rem;
    }



/* ===========================
   Popular section
   =========================== */

.ccSearchPopularWrapper {
    margin-top: 1rem;
    padding-top: .5rem;
    text-align: center;
}

.ccSearchPopularTitle {
    /* margin: 0 0 0.5rem; */
    font-size: .9rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #333;
}

/* Popular links inline, blue, spaced out */
.ccSearchPopularWrapper a {
    display: inline-block;
    font-size: .8rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
}

    .ccSearchPopularWrapper a:hover {
        text-decoration: underline;
    }


/*Pagination*/

#sf-search-result-pager {
    margin-top: 1rem;
    text-align: center;
}

    #sf-search-result-pager .pagination {
        display: inline-flex;
        list-style: none;
        padding: 0;
        margin: 0;
        gap: 0.25rem;
    }

    #sf-search-result-pager .page-item {
    }

    #sf-search-result-pager .page-link {
        display: block;
        padding: 0.45rem 0.75rem;
        font-size: 0.85rem;
        color: #2f3c4a;
        text-decoration: none;
        border: 1px solid #ccc;
        border-radius: 4px;
        transition: all 0.2s ease;
    }

        #sf-search-result-pager .page-link:hover {
            background-color: #d1e1f1;
            font-weight: bold;
            border: 1px solid #999;
        }

    #sf-search-result-pager .page-item.active .page-link {
        background-color: var(--cc-navBlue);
        color: #fff;
        border-color: #fff;
        font-weight: 500;
    }

    #sf-search-result-pager .page-item.disabled .page-link {
        color: #aaa;
        cursor: not-allowed;
        background-color: #f7f7f7;
        border-color: #ddd;
    }
/* Low Res Desktop*/
@media (max-width: 1080px) {
    .ccSearchBoxWrapper {
        width: 100%;
        margin: unset;
    }

    .facetbar {
        width: 15rem;
        font-size: .9rem;
        min-width: 15rem;
        padding-top: 0;
        flex: 0 0 15rem;
        margin-bottom: 0;
    }
}
/* Tablets */
@media (max-width: 768px) {
    .navbar .navMenuH2 {
        display: none;
    }

    .ccSearchModalBlock {
        max-width: 100%;
        min-width: 90%;
    }

    .facetbar {
        width: 100%;
        min-width: 100%;
        flex: 0 0 100%;
        border-radius: 0;
        padding-top: 1rem;
        padding-bottom: 0;
    }

    #facetContainer .applyFilter, #facetContainer #applied-filters, #facetContainer #facetContent {
        display: none;
    }

    #facetContainer .titleCaps {
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding-bottom: 0;
        margin-bottom: 0;
        transition: all .2s ease;
        align-items: center;
    }

        #facetContainer .titleCaps::after {
            align-items: center;
            font-family: 'ccicons';
            content: '\ea1c';
            display: block;
            font-size: 2rem;
        }

        #facetContainer .titleCaps.onMode::after {
            font-family: 'ccicons';
            content: '\ea19';
        }

    #facetContainer .applyFilter.mobileFilterOn, #facetContainer #facetContent.mobileFilterOn {
        display: flex !important;
        flex-direction: column;
    }

    #facetContainer #applied-filters.mobileFilterOn {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    #applied-filters li {
        width: fit-content;
        margin: .25rem 1rem 1rem .25rem;
    }

    .searchBody .breadcrumbs {
        padding-top: 1rem;
    }
}

@media (max-width: 576px) {
    .ccSearchModalBlock {
        max-width: 100%;
        min-width: 100%;
    }

    .ccSearchModalBody {
        background: #e1e2e4;
        padding: 2.5rem .5rem;
        overflow: visible;
    }

    .ccSearchBoxModal .d-flex {
        flex: 1 1 auto;
    }

    .searchBody .searchResultData .filterIcon {
        display: none;
    }
}
