/* Idol Horse smart search */

/* ---- Header dropdown ---- */
.ih-ss-dropdown {
    position: fixed;
    z-index: 100001; /* the theme's fixed header is 100000 */
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(14, 68, 54, .18);
    overflow-y: auto;
    overscroll-behavior: contain;
    color: #0e4436;
    text-align: left;
}
.ih-ss-dropdown[hidden] {
    display: none;
}
.ih-ss-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #0e4436;
    text-decoration: none;
    border-bottom: 1px solid #eef1ea;
    transition: background-color .15s;
}
.ih-ss-item:hover,
.ih-ss-item.is-active {
    background: #f5f8f2;
    color: #0e4436;
}
.ih-ss-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: #d9e3cb;
}
.ih-ss-item--jockeys .ih-ss-thumb,
.ih-ss-item--trainers .ih-ss-thumb,
.ih-ss-item--horses .ih-ss-thumb {
    border-radius: 50%;
}
.ih-ss-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ih-ss-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ih-ss-title {
    font-family: "GTSuperTxtTrial-Bk", Georgia, serif;
    font-size: 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ih-ss-title mark {
    background: #d9e3cb;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}
.ih-ss-meta {
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 11px;
    opacity: .6;
    text-transform: uppercase;
}
.ih-ss-badge,
.ih-sr-badge {
    flex: 0 0 auto;
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 9px;
    border-radius: 12px;
    white-space: nowrap;
    background: #d9e3cb;
    color: #0e4436;
}
.ih-ss-badge--news {
    background: #0e4436;
    color: #fff;
}
.ih-ss-badge--horses,
.ih-sr-badge--horses {
    background: transparent;
    box-shadow: inset 0 0 0 1px #0e4436;
}
.ih-ss-view-all {
    display: block;
    padding: 13px 16px;
    text-align: center;
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #0e4436;
    background: #f5f8f2;
    text-decoration: none;
    position: sticky;
    bottom: 0;
}
.ih-ss-view-all:hover {
    background: #d9e3cb;
    color: #0e4436;
}
.ih-ss-view-all span {
    opacity: .6;
}
.ih-ss-status {
    padding: 20px 16px;
    text-align: center;
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 12px;
    opacity: .6;
}
.ih-ss-dots::after {
    content: "";
    animation: ih-ss-dots 1.2s steps(4, end) infinite;
}
@keyframes ih-ss-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}
@media (max-width: 767px) {
    .ih-ss-item {
        padding: 10px 12px;
    }
    .ih-ss-thumb {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }
    .ih-ss-title {
        font-size: 14px;
    }
}

/* ---- Archive search results ---- */
#articles-list .ih-sr-summary,
#articles-list .ih-sr-group,
#articles-list .ih-sr-group-title--articles {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
}
.ih-sr-summary {
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #0e4436;
    opacity: .7;
}
.ih-sr-group-title {
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 12px;
    font-weight: normal;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #0e4436;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(14, 68, 54, .2);
}
.ih-sr-profiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.ih-sr-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border: 1px solid rgba(14, 68, 54, .25);
    border-radius: 40px;
    color: #0e4436;
    text-decoration: none;
    transition: background-color .2s, border-color .2s;
}
.ih-sr-profile:hover {
    background: #f5f8f2;
    border-color: #0e4436;
    color: #0e4436;
}
.ih-sr-profile-img {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: #d9e3cb;
}
.ih-sr-profile-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ih-sr-profile-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.ih-sr-profile-name {
    font-family: "GTSuperTxtTrial-Bk", Georgia, serif;
    font-size: 17px;
    line-height: 1.2;
}
.ih-sr-profile-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 11px;
}
@media (max-width: 767px) {
    .ih-sr-profiles {
        grid-template-columns: 1fr;
    }
}

/* ---- Archive page search bar (styled like the smart search demo) ----
 * Keyed on the page template's body class so it applies before JS runs;
 * JS adds the clear button and the dropdown. */
.page-template-template-articles .filter-module .filter-box .filter-button-box .input-box {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.page-template-template-articles .filter-module .filter-box .filter-button-box .input-box::before {
    content: none;
}
.page-template-template-articles .filter-module .search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 16px 0 24px;
    background: #fff;
    border: 1.5px solid rgba(14, 68, 54, .25);
    border-radius: 48px;
    transition: border-color .3s, box-shadow .3s, transform .3s;
}
.page-template-template-articles .filter-module .search-wrapper::before {
    content: "";
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: .35;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e4436' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: opacity .3s, transform .3s;
}
.page-template-template-articles .filter-module .search-wrapper:focus-within {
    border-color: #0e4436;
    box-shadow: 0 6px 24px rgba(14, 68, 54, .12), 0 0 0 4px rgba(14, 68, 54, .06);
    transform: translateY(-1px);
}
.page-template-template-articles .filter-module .search-wrapper:focus-within::before {
    opacity: .7;
    transform: scale(1.1);
}
.page-template-template-articles .filter-module .filter-box .filter-button-box .input-box input#search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    font-family: "GTSuperTxtTrial-Bk", Georgia, serif;
    font-size: 18px;
    color: #0e4436;
    -webkit-appearance: none;
    appearance: none;
}
.page-template-template-articles .filter-module .filter-box .filter-button-box .input-box input#search-input::placeholder {
    font-family: "GTSuperTxtTrial-Bk", Georgia, serif;
    font-size: 18px;
    color: #0e4436;
    opacity: .35;
}
/* The bar's :focus-within ring shows focus; drop the theme's input outline. */
.page-template-template-articles .filter-module input#search-input:focus,
.page-template-template-articles .filter-module input#search-input:focus-visible {
    outline: none !important;
}
.page-template-template-articles .filter-module input#search-input::-webkit-search-cancel-button,
.page-template-template-articles .filter-module input#search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    display: none;
}
.ih-ss-bar-clear {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-left: 8px;
    padding: 0;
    border: 1.5px solid rgba(14, 68, 54, .2);
    border-radius: 50%;
    background: transparent;
    color: #0e4436;
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    opacity: .5;
    transition: background-color .2s, color .2s, border-color .2s, opacity .2s, transform .2s;
}
.ih-ss-bar-clear[hidden] {
    display: none;
}
.ih-ss-bar-clear:hover,
.ih-ss-bar-clear:focus-visible {
    background: #0e4436;
    border-color: #0e4436;
    color: #fff;
    opacity: 1;
    transform: scale(1.1);
}
/* Heading + subtitle laid out like the demo: one 720px left-aligned column. */
.page-template-template-articles .filter-module h1,
.page-template-template-articles .filter-module .ih-ss-subtitle {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.page-template-template-articles .filter-module h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 8px;
}
.page-template-template-articles .filter-module .ih-ss-subtitle {
    margin-top: 0;
    margin-bottom: 40px;
    font-family: "GTFlexaMonoTrial-Lt", monospace;
    font-size: 13px;
    line-height: 1.15;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #0e4436;
    opacity: .6;
}
/* Before JS moves it, keep the hint out of the bar's spot. */
.page-template-template-articles .filter-module .filter-box .filter-button-box .input-box > p {
    display: none;
}

/* Dropdown under the archive search bar */
.ih-ss-dropdown--inline {
    position: absolute;
    top: 64px; /* bar height + 8px */
    left: 0;
    right: 0;
    z-index: 50;
    max-height: min(560px, 70vh);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(14, 68, 54, .15);
}
.ih-ss-dropdown--inline .ih-ss-item {
    padding: 12px 20px;
}
.ih-ss-dropdown--inline .ih-ss-thumb {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
    border-radius: 8px;
}
/* The theme absolutely positions every img inside .input-box (its old icon). */
.filter-module .filter-box .filter-button-box .input-box .ih-ss-dropdown--inline img {
    position: static;
}
.ih-ss-dropdown--inline .ih-ss-item--jockeys .ih-ss-thumb,
.ih-ss-dropdown--inline .ih-ss-item--trainers .ih-ss-thumb,
.ih-ss-dropdown--inline .ih-ss-item--horses .ih-ss-thumb {
    border-radius: 50%;
}
.ih-ss-dropdown--inline .ih-ss-view-all {
    padding: 14px 20px;
}

@media (max-width: 767px) {
    .page-template-template-articles .filter-module h1 {
        font-size: 30px;
    }
    .page-template-template-articles .filter-module .search-wrapper {
        height: 48px;
        padding: 0 12px 0 18px;
    }
    .page-template-template-articles .filter-module .search-wrapper:focus-within {
        transform: none;
    }
    .page-template-template-articles .filter-module .filter-box .filter-button-box .input-box input#search-input,
    .page-template-template-articles .filter-module .filter-box .filter-button-box .input-box input#search-input::placeholder {
        font-size: 16px;
    }
    .ih-ss-dropdown--inline {
        top: 56px;
    }
    .ih-ss-dropdown--inline .ih-ss-item {
        padding: 10px 12px;
    }
    .ih-ss-dropdown--inline .ih-ss-thumb {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
    }
}
