﻿/* Mega Search Block Styles */

/* Login bar overflow */
body #login-bar {
    overflow: visible;
}

/* Search Criteria Tags */
.mega-search-block #search-criteria > span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    background: #d7dbef;
    border: 1px solid #004185;
    border-radius: 10px;
    cursor: pointer;
}

.mega-search-block #search-criteria > span:after {
    content: "✕";
    display: inline-block;
    font-weight: bold;
    margin-left: 10px;
}

@media screen and (max-width: 700px) {
    .mega-search-block #search-criteria > span {
        display: table;
        margin: 5px 0;
    }
}

.mega-search-block #search-criteria #clear-criteria {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    background: #fdc6c6;
    border: 1px solid #ff0101;
    border-radius: 10px;
    cursor: pointer;
    line-height: unset;
    font-size: 16px;
    vertical-align: top;
}

.mega-search-block #search-criteria #clear-criteria:after {
    content: "✕";
    display: inline-block;
    font-weight: bold;
    margin-left: 10px;
}

@media screen and (max-width: 700px) {
    .mega-search-block #search-criteria #clear-criteria {
        display: table;
        margin: 5px 0;
    }
}

/* Main wrapper for block */
.mega-search-block .mega-search-wrapper {
    width: 100%;
    max-width: 100%;
}

/* Entry header */
.mega-search-block .entry-header {
    margin-bottom: 20px;
}

/* Article/Results container */
.mega-search-block .mega-search-results {
    width: 100%;
    max-width: 100%;
}

.mega-search-block .mega-search-results .entry-content {
    width: 100%;
}

/* Quick Links Navigation */
.mega-search-block #quickLinks {
    margin: 20px 0;
    clear: both;
}

@media (max-width: 700px) {
    .mega-search-block #quickLinks a {
        display: block;
    }
}

.mega-search-block #quickLinks a:after {
    content: "|";
    margin: 0 10px;
    display: inline-block;
}

.mega-search-block #quickLinks a:last-child:after {
    content: "";
}

@media (max-width: 700px) {
    .mega-search-block #quickLinks a:after {
        content: "";
    }
}

/* Section visibility */
.mega-search-block section {
    display: none;
}

.mega-search-block section.show {
    display: block;
}

/* Results grids for all sections */
.mega-search-block section.columns .results,
.mega-search-block section.profiles .results,
.mega-search-block section.digitalIssues .results {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    margin-bottom: 20px;
    gap: 20px;
}

.mega-search-block section.columns .results .result,
.mega-search-block section.profiles .results .result,
.mega-search-block section.digitalIssues .results .result {
    width: 30%;
    min-width: 300px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .mega-search-block section.columns .results .result,
    .mega-search-block section.profiles .results .result,
    .mega-search-block section.digitalIssues .results .result {
        width: 45%;
    }
}

@media (max-width: 768px) {
    .mega-search-block section.columns .results .result,
    .mega-search-block section.profiles .results .result,
    .mega-search-block section.digitalIssues .results .result {
        width: 100%;
    }
}

/* Image containers */
.mega-search-block section.columns .results .result .image,
.mega-search-block section.profiles .results .result .image {
    width: 100%;
    height: 0;
    position: relative;
    padding-bottom: 67%;
    overflow: hidden;
    background: #f0f0f0;
}

.mega-search-block section.columns .results .result .image img,
.mega-search-block section.profiles .results .result .image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Digital Issues specific styles */
.mega-search-block section.digitalIssues .results .result img,
.mega-search-block section.digitalIssues .results .result canvas {
    width: 100%;
    height: auto;
    display: block;
}

.mega-search-block section.digitalIssues .results .result p {
    margin: 10px 0;
}

/* Result titles */
.mega-search-block .result .title {
    margin-top: 10px;
    font-weight: bold;
}

.mega-search-block .result a {
    text-decoration: none;
    color: inherit;
}

.mega-search-block .result a:hover {
    text-decoration: underline;
}

/* More Links */
.mega-search-block .moreLink {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 10px auto;
    padding: 10px 20px;
    border: 1px solid #013971;
    text-align: center;
    text-decoration: none;
    background: #fff;
    color: #013971;
    cursor: pointer;
}

.mega-search-block .moreLink:hover {
    background: #013971;
    color: #fff;
}

.mega-search-block .moreLink[disabled],
.mega-search-block .moreLink[disabled="disabled"] {
    color: #999;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.mega-search-block .moreLink[disabled]:hover,
.mega-search-block .moreLink[disabled="disabled"]:hover {
    background: #fff;
    color: #999;
}

/* Platinum section */
.mega-search-block section.platinum h2 {
    margin-bottom: 20px;
}

.mega-search-block section.platinum em {
    color: #666;
}

.mega-search-block #result .result-body {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 20px;
}

.mega-search-block #result .result-body .platRow {
    width: 30%;
    min-width: 300px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .mega-search-block #result .result-body .platRow {
        width: 45%;
    }
}

@media (max-width: 768px) {
    .mega-search-block #result .result-body .platRow {
        width: 100%;
    }
}

/* Pure grid classes (if not loaded elsewhere) */
.mega-search-block .pure-g {
    display: flex;
    flex-wrap: wrap;
}

.mega-search-block .pure-u-1 {
    width: 100%;
}

.mega-search-block .gutter {
    margin: 20px 0;
}

/* Section headers */
.mega-search-block section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #013971;
}

/* No results message */
.mega-search-block section p {
    margin: 10px 0;
}

/* Digital Issues wrapper */
.mega-search-block section.digitalIssues .wrapper {
    width: 100%;
}

/* Edit link */
.mega-search-block .edit-link {
    display: inline-block;
    margin-bottom: 10px;
}

/* Search Form Styles (if search form is included) */
.mega-search-block #ms_shortcode {
    height: auto !important;
    margin-bottom: 30px;
}

.mega-search-block #ms_shortcode .stacked .select2-container {
    height: 31.8px;
    min-height: 31.8px;
}

.mega-search-block #ms_shortcode .stacked .select2-container .select2-selection {
    line-height: 31.8px;
    height: 31.8px;
}

.mega-search-block #ms_shortcode .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 31.8px;
}

.mega-search-block #ms_shortcode .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 31.8px !important;
}

.mega-search-block #ms_shortcode .stacked label {
    z-index: 999;
}

.mega-search-block #ms_shortcode .stacked .select2 {
    z-index: 1;
}

.mega-search-block #ms_shortcode #mega_search_container {
    line-height: 31.8px;
    float: none;
}

.mega-search-block #ms_shortcode #mega_search_container h2 {
    color: #fff;
    text-align: center;
}

.mega-search-block #ms_shortcode #mega_search_container form {
    float: none;
    margin-top: 0;
}

.mega-search-block #ms_shortcode #mega_search_container form .search_row {
    display: flex;
    justify-content: start;
    flex-direction: row;
    position: relative;
    flex-wrap: wrap;
    width: 100%;
}

.mega-search-block #ms_shortcode #mega_search_container form .search_row .group {
    display: flex;
    align-items: center;
    padding: 10px;
    width: 25%;
}

@media (max-width: 768px) {
    .mega-search-block #ms_shortcode #mega_search_container form .search_row .group {
        width: 50%;
    }
}

@media (max-width: 500px) {
    .mega-search-block #ms_shortcode #mega_search_container form .search_row .group {
        width: 100%;
        flex-direction: column;
    }
}

/* Above Content Search Styles */
.mega-search-block #aboveContent {
    height: auto !important;
}

.mega-search-block #aboveContent #search_container {
    float: right;
    line-height: 31.8px;
}

@media (max-width: 770px) {
    .mega-search-block #aboveContent #search_container {
        float: none;
    }
}