@import url('responsive.css');

/* ====================== SEARCH-HEADER.CSS ====================== */

/* ── Global navigation — single source of truth (removed from Site.css / Index.css) ── */
#globalNavigation {
    position: relative;
    width: 80%;
    height: 32px;
    box-sizing: border-box !important;
    padding-right: 55px !important;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}
#globalNavigation.has-lang {
    padding-right: 115px !important;
}
#globalNavigation > a {
    float: none;
    font-size: 20px;
    font-weight: 500;
    font-family: Candara, Arial, Liberation Sans;
    margin: 0 !important;
    line-height: 32px;
    color: black;
    text-decoration: none;
    white-space: nowrap;
}
#globalNavigation > a:hover { border-bottom: #777777 solid 2px; }
#globalNavigation a.activeNav { font-weight: 700; }

/* ── Language / region selector ── */
#langSelector {
    position: absolute !important;
    right: 54px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px 8px; /* extra bottom padding bridges the gap to the dropdown */
    border-radius: 16px;
    font-family: Calibri, Arial, Liberation Sans;
}
#langSelector:hover { background-color: #ffffff; opacity: 0.85; }
#langSelector .langArrow { font-size: 10px; color: #555; }
.langDropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%; /* flush — no gap; #langSelector padding-bottom bridges it */
    background: #eeeeee;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
    min-width: 150px;
    z-index: 1001;
    overflow: hidden;
}
#langSelector:hover .langDropdown,
#langSelector.open .langDropdown { display: block; }
.langDropdown a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #000 !important;
    font-size: 14px !important;
    font-weight: 500;
    margin: 0 !important;
    float: none !important;
    border-bottom: 1px solid #ddd;
    text-decoration: none;
}
.langDropdown a:last-child { border-bottom: none; }
.langDropdown a:hover { background: #e0e0e0; }

/* On desktop: wrapper is absolutely positioned in #header (position:relative) */
#searchWrapper {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

#searchTrigger {
    cursor: pointer;
    padding: 6px;
    border-radius: 16px;
    font-family: Calibri, Arial, Liberation Sans;
}

#searchTrigger:hover {
    opacity: 0.7;
    background-color: #ffffff;
}

#searchTrigger svg {
    display: block;
    margin: 0 auto;
    width: 22px;
    height: 22px;
    stroke: #000;
    stroke-width: 2.5;
}

#searchTrigger .searchLabel {
    display: block;
    font-family: Calibri, Arial, Liberation Sans;
    font-size: 12px;
    color: #000;
    line-height: 1;
}

#headerSearch table,
#headerSearch th,
#headerSearch td {
    border: 0px solid #CBDADE !important;
}

#headerSearch a {
    margin-left: 0px !important;
}

/* Popup container */
#headerSearch {
    position: absolute;
    right: 0px;
    top: 100%;
    width: 420px;
    max-width: 96vw;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#headerSearch.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

/* Force CSE inner containers to fill the popup width */
#headerSearch .gcse-searchbox,
#headerSearch > div,
#headerSearch .gsc-control-cse,
#headerSearch .gsc-search-box-tools {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Google CSE box styling */
#headerSearch .gsc-control-cse {
    background: #fff !important;
    padding: 16px !important;
    overflow: hidden !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Google CSE box styling */
#headerSearch .gsc-input-box {
    padding-top: 0px !important;
}

/* remove Google spacing, override CSE's hardcoded max-width:343px */
#headerSearch form.gsc-search-box,
#headerSearch table.gsc-search-box {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* input wrapper */

/* search button */
#headerSearch button.gsc-search-button {
    height: 44px !important;
    width: 44px !important;
    background: #012DAD !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
}

#headerSearch button.gsc-search-button svg {
    fill: white !important;
}

/* results */
#headerSearch .gsc-results {
    margin-top: 12px !important;
    max-height: 70vh;
    overflow-y: auto;
}

/* result title */
#headerSearch .gs-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #012DAD !important;
}

/* snippet */
#headerSearch .gs-snippet {
    font-size: 14px !important;
    color: #444 !important;
}

/* each result block */
#headerSearch .gsc-webResult {
    padding: 10px 0 !important;
    border-bottom: 1px solid #eee !important;
}

#gsc-iw-id1,
/* input wrapper */
#gsc-iw-id1~.gsc-results-wrapper-overlay {
    width: 100% !important;
    max-width: 100% !important;
}

.gsc-results-wrapper-overlay {
    top: 50px;
    left: 0 !important;
    right: 0 !important;
    width: 1280px !important;
    border-radius: 6px !important;
    z-index: 999999 !important;
}

.gsc-wrapper {
    max-width: unset !important;
}

.gsc-control-cse {
    padding: 0px !important;
    border: 0px solid #CBDADE !important;

}

.gsc-clear-button {
    display: none !important;
    border: 0px solid #CBDADE !important;

}

