:root {
    --tcs-accent-fallback: #20368f;
}

html.tcs-search-open,
body.tcs-search-open {
    overflow: hidden;
}

.tcs-search-overlay,
.tcs-search-overlay * {
    font-family: "Montserrat", sans-serif;
}

.tcs-search-icon {
    width: 1.7rem;
    height: 1.7rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.tcs-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
}

/* Keep the navigation trigger at an exact 1.7rem even when Elementor/theme SVG rules are present. */
.teepee-main-menu svg.tcs-search-icon.tcs-menu-search-icon,
.tcs-menu-trigger > svg.tcs-search-icon.tcs-menu-search-icon,
svg.tcs-search-icon.tcs-menu-search-icon {
    width: 1.7rem !important;
    height: 1.7rem !important;
    min-width: 1.7rem !important;
    min-height: 1.7rem !important;
    max-width: 1.7rem !important;
    max-height: 1.7rem !important;
    flex: 0 0 1.7rem !important;
    color: #fff;
    cursor: pointer;
    margin-left: 18px;
    transition: transform .2s ease, opacity .2s ease, filter .2s ease;
}

/* Trigger the hover state from the parent menu item so Elementor cannot swallow the SVG hover. */
.teepee-main-menu .tcs-menu-trigger:hover > svg.tcs-menu-search-icon,
.teepee-main-menu .tcs-menu-trigger:focus-within > svg.tcs-menu-search-icon,
.tcs-menu-trigger:hover > svg.tcs-menu-search-icon,
.tcs-menu-trigger:focus-within > svg.tcs-menu-search-icon,
svg.tcs-search-icon.tcs-menu-search-icon:hover,
svg.tcs-search-icon.tcs-menu-search-icon:focus-visible {
    opacity: 1 !important;
    transform: scale(1.08) !important;
    transform-origin: center center !important;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, .5)) !important;
}

.tcs-menu-trigger > .tcs-menu-search-icon:focus-visible,
.tcs-inline-trigger:focus-visible,
.tcs-search-close:focus-visible,
.tcs-search-clear:focus-visible,
.tcs-load-more:focus-visible,
.tcs-search-input:focus-visible {
    outline: 2px solid var(--e-global-color-primary, var(--tcs-accent-fallback));
    outline-offset: 4px;
}

.tcs-inline-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

/* Shortcode trigger used in the Elementor header. */
.elementor-shortcode .tcs-inline-trigger > svg.tcs-search-icon,
.tcs-inline-trigger > svg.tcs-search-icon {
    width: 1.7rem !important;
    height: 1.7rem !important;
    min-width: 1.7rem !important;
    min-height: 1.7rem !important;
    max-width: 1.7rem !important;
    max-height: 1.7rem !important;
    flex: 0 0 1.7rem !important;
    transition: transform .2s ease, filter .2s ease, opacity .2s ease !important;
    transform-origin: center center !important;
}

.elementor-shortcode .tcs-inline-trigger:hover > svg.tcs-search-icon,
.elementor-shortcode .tcs-inline-trigger:focus-visible > svg.tcs-search-icon,
.tcs-inline-trigger:hover > svg.tcs-search-icon,
.tcs-inline-trigger:focus-visible > svg.tcs-search-icon {
    opacity: 1 !important;
    transform: scale(1.08) !important;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, .65)) !important;
}

.tcs-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #f7f8fa;
    color: #111827;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}

.tcs-search-overlay.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.tcs-search-overlay__panel {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.tcs-search-shell {
    width: min(1380px, calc(100% - 80px));
    margin: 0 auto;
    padding: clamp(82px, 10vh, 130px) 0 80px;
    transform: translateY(18px);
    opacity: 0;
    transition: transform .42s cubic-bezier(.2,.75,.25,1), opacity .3s ease;
}

.tcs-search-overlay.is-open .tcs-search-shell {
    transform: translateY(0);
    opacity: 1;
}

.tcs-search-close {
    position: fixed;
    top: 28px;
    right: 34px;
    z-index: 3;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(17,24,39,.12);
    border-radius: 50% !important;
    background: rgba(255,255,255,.9);
    color: #111827;
    box-shadow: 0 10px 32px rgba(17,24,39,.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.tcs-search-overlay button.tcs-search-close:hover,
.tcs-search-overlay button.tcs-search-close:focus-visible {
    border-color: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
    background: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.tcs-search-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

/* Force the X itself to white; some themes style button SVG paths separately. */
.tcs-search-overlay button.tcs-search-close:hover svg,
.tcs-search-overlay button.tcs-search-close:hover svg path,
.tcs-search-overlay button.tcs-search-close:focus-visible svg,
.tcs-search-overlay button.tcs-search-close:focus-visible svg path {
    color: #fff !important;
    stroke: #fff !important;
    fill: none !important;
}

.tcs-search-header {
    max-width: 960px;
}

.tcs-search-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
    color: var(--e-global-color-primary, var(--tcs-accent-fallback));
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.tcs-search-eyebrow::before {
    content: "";
    width: 34px;
    height: 2px;
    background: currentColor;
}

.tcs-search-heading {
    margin: 0 0 38px;
    color: var(--e-global-color-secondary);
    font: inherit;
    font-size: clamp(38px, 5vw, 70px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.tcs-search-form {
    margin: 0;
}

.tcs-search-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #cfd4dc;
    transition: border-color .2s ease;
}

.tcs-search-field-wrap:focus-within {
    border-color: var(--e-global-color-secondary, var(--tcs-accent-fallback));
}

.tcs-search-field-icon {
    flex: 0 0 auto;
    color: var(--e-global-color-secondary, var(--tcs-accent-fallback));
    margin-right: clamp(14px, 2vw, 25px);
}

.tcs-search-field-icon .tcs-search-icon {
    width: clamp(28px, 3vw, 42px);
    height: clamp(28px, 3vw, 42px);
    stroke-width: 1.35;
}

.tcs-search-input {
    width: 100%;
    min-width: 0;
    padding: 18px 100px 22px 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
    font: inherit;
    font-size: clamp(27px, 3.5vw, 48px) !important;
    font-weight: 500 !important;
    line-height: 1.18;
    letter-spacing: -.025em;
    outline: 0 !important;
    -webkit-appearance: none;
}

.tcs-search-input::placeholder {
    color: #9aa2af;
    opacity: 1;
}

.tcs-search-input::-webkit-search-cancel-button {
    display: none;
}

.tcs-search-clear {
    position: absolute;
    right: 0;
    bottom: 27px;
    border: 0;
    background: transparent;
    color: #667085;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0 4px 12px;
}

/* Teepee/Elementor applies its own button hover colour, so force CLEAR text white. */
.tcs-search-overlay .tcs-search-field-wrap button.tcs-search-clear:hover,
.tcs-search-overlay .tcs-search-field-wrap button.tcs-search-clear:focus-visible {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.tcs-search-toolbar {
    min-height: 46px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-top: 13px;
    border-bottom: 0;
}

.tcs-search-hint,
.tcs-search-count {
    margin: 0 0 14px;
    color: #7b8491;
    font-size: 12px;
    line-height: 1.5;
}

.tcs-search-count {
    color: #344054;
    font-weight: 600;
    text-align: right;
}

.tcs-search-state {
    min-height: 310px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #667085;
    padding: 45px 20px;
}

.tcs-search-state[hidden] {
    display: none !important;
}

.tcs-search-state__icon {
    width: 66px;
    height: 66px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(17,24,39,.07);
    color: var(--e-global-color-primary, var(--tcs-accent-fallback));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tcs-search-state__icon .tcs-search-icon {
    width: 25px;
    height: 25px;
}

.tcs-search-state p {
    max-width: 520px;
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}

.tcs-search-state h3 {
    margin: 0 0 9px;
    color: #111827;
    font: inherit;
    font-size: 24px;
    font-weight: 600;
}

.tcs-search-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-top: 28px;
}

.tcs-search-card {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    min-height: 180px;
    overflow: hidden;
    border: 1px solid #e2e5e9;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    text-decoration: none !important;
    box-shadow: 0 4px 18px rgba(17,24,39,.035);
    transform: translateY(0);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.tcs-search-card:hover,
.tcs-search-card:focus-visible {
    border-color: rgba(32,54,143,.28);
    box-shadow: 0 16px 42px rgba(17,24,39,.10);
    transform: translateY(-3px);
}

.tcs-search-card:focus-visible {
    outline: 2px solid var(--e-global-color-primary, var(--tcs-accent-fallback));
    outline-offset: 3px;
}

.tcs-search-card__media {
    min-height: 180px;
    background: linear-gradient(145deg, rgba(32,54,143,.08), rgba(32,54,143,.16));
    overflow: hidden;
    position: relative;
}

.tcs-search-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s cubic-bezier(.2,.65,.25,1);
}

.tcs-search-card:hover .tcs-search-card__media img {
    transform: scale(1.04);
}

.tcs-search-card__fallback {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--e-global-color-primary, var(--tcs-accent-fallback));
}

.tcs-search-card__fallback .tcs-search-icon {
    width: 37px;
    height: 37px;
    opacity: .68;
}

.tcs-search-card__body {
    min-width: 0;
    padding: 24px 24px 21px;
    display: flex;
    flex-direction: column;
}

.tcs-search-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: #7b8491;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.tcs-search-card__type {
    color: var(--e-global-color-primary, var(--tcs-accent-fallback));
}

.tcs-search-card__meta-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #b5bbc4;
}

.tcs-search-card__title {
    margin: 0 0 9px;
    color: #111827;
    font: inherit;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.24;
    letter-spacing: -.015em;
}

.tcs-search-card__excerpt {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tcs-search-card mark {
    background: rgba(32,54,143,.11);
    color: inherit;
    border-radius: 2px;
    padding: 0 .08em;
}

.tcs-search-card__arrow {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    justify-content: flex-end;
    color: var(--e-global-color-primary, var(--tcs-accent-fallback));
}

.tcs-search-card__arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}

.tcs-search-card:hover .tcs-search-card__arrow svg {
    transform: translateX(4px);
}

.tcs-search-actions {
    display: flex;
    justify-content: center;
    padding-top: 34px;
}

.tcs-search-actions[hidden] {
    display: none !important;
}

.tcs-load-more {
    appearance: none;
    border: 1px solid var(--e-global-color-primary, var(--tcs-accent-fallback));
    border-radius: 999px;
    background: transparent;
    color: var(--e-global-color-primary, var(--tcs-accent-fallback));
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 13px 19px 13px 21px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.tcs-search-overlay .tcs-search-actions button.tcs-load-more:hover,
.tcs-search-overlay .tcs-search-actions button.tcs-load-more:focus-visible {
    background: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
    border-color: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    transform: translateY(-1px);
}

.tcs-search-overlay .tcs-search-actions button.tcs-load-more:hover > span,
.tcs-search-overlay .tcs-search-actions button.tcs-load-more:focus-visible > span {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.tcs-load-more svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tcs-search-overlay .tcs-search-actions button.tcs-load-more:hover svg,
.tcs-search-overlay .tcs-search-actions button.tcs-load-more:hover svg path,
.tcs-search-overlay .tcs-search-actions button.tcs-load-more:focus-visible svg,
.tcs-search-overlay .tcs-search-actions button.tcs-load-more:focus-visible svg path {
    color: #fff !important;
    stroke: #fff !important;
    fill: none !important;
}

.tcs-search-skeleton {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    min-height: 180px;
    overflow: hidden;
    border: 1px solid #e8eaee;
    border-radius: 10px;
    background: #fff;
}

.tcs-search-skeleton__media,
.tcs-search-skeleton__line {
    background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 38%, #eef0f3 63%);
    background-size: 400% 100%;
    animation: tcsShimmer 1.25s ease infinite;
}

.tcs-search-skeleton__body {
    padding: 25px;
}

.tcs-search-skeleton__line {
    height: 11px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.tcs-search-skeleton__line:nth-child(1) { width: 28%; }
.tcs-search-skeleton__line:nth-child(2) { width: 75%; height: 18px; margin-top: 17px; }
.tcs-search-skeleton__line:nth-child(3) { width: 95%; margin-top: 18px; }
.tcs-search-skeleton__line:nth-child(4) { width: 82%; }

@keyframes tcsShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

@media (max-width: 1024px) {
    .tcs-search-shell {
        width: min(100% - 50px, 1100px);
        padding-top: 95px;
    }

    .tcs-search-results {
        grid-template-columns: 1fr;
    }

    .tcs-search-card,
    .tcs-search-skeleton {
        grid-template-columns: 190px minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .tcs-search-shell {
        width: calc(100% - 30px);
        padding: 82px 0 50px;
    }

    /* Elementor/theme button rules are very broad, so fully reset the mobile close control. */
    .tcs-search-overlay button.tcs-search-close {
        top: 16px !important;
        right: 16px !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }

    .tcs-search-overlay button.tcs-search-close svg {
        width: 20px !important;
        height: 20px !important;
    }

    #tcs-search-heading.tcs-search-heading {
        margin-bottom: 24px !important;
        font-size: 1.7rem !important;
        line-height: 1.1 !important;
    }

    .tcs-search-field-wrap {
        gap: 10px;
    }

    .tcs-search-field-icon {
        margin-right: 0;
    }

    .tcs-search-field-icon .tcs-search-icon {
        width: 28px;
        height: 28px;
    }

    .tcs-search-input {
        flex: 1 1 auto;
        padding: 14px 0 17px 0;
        font-size: clamp(21px, 6.5vw, 29px) !important;
    }

    /* Keep CLEAR compact and in the field flow so it can never overlap the input text. */
    .tcs-search-overlay .tcs-search-field-wrap button.tcs-search-clear {
        position: static !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 7px 12px !important;
        margin: 0 0 3px 0 !important;
        border: 1px solid var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
        border-radius: 999px !important;
        background: transparent !important;
        color: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
        -webkit-text-fill-color: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
        box-shadow: none !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
        letter-spacing: .04em;
        text-transform: uppercase;
        white-space: nowrap;
        box-sizing: border-box !important;
    }

    .tcs-search-overlay .tcs-search-field-wrap button.tcs-search-clear:hover,
    .tcs-search-overlay .tcs-search-field-wrap button.tcs-search-clear:focus-visible {
        border-color: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
        background: var(--e-global-color-secondary, var(--tcs-accent-fallback)) !important;
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
    }

    .tcs-search-toolbar {
        min-height: 56px;
        flex-direction: column;
        gap: 2px;
        padding-top: 10px;
    }

    .tcs-search-hint,
    .tcs-search-count {
        margin-bottom: 4px;
        text-align: left;
    }

    .tcs-search-results {
        gap: 15px;
        padding-top: 20px;
    }

    .tcs-search-card,
    .tcs-search-skeleton {
        display: block;
        min-height: 0;
    }

    .tcs-search-card__media,
    .tcs-search-card__fallback,
    .tcs-search-skeleton__media {
        height: 180px;
        min-height: 180px;
    }

    .tcs-search-card__body {
        padding: 19px 19px 17px;
    }

    .tcs-search-card__title {
        font-size: 18px;
    }

    .tcs-search-skeleton__body {
        padding: 20px;
    }

    .tcs-search-state {
        min-height: 250px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tcs-search-overlay,
    .tcs-search-shell,
    .tcs-search-card,
    .tcs-search-card__media img,
    .tcs-search-card__arrow svg,
    .tcs-search-close,
    .tcs-load-more {
        transition: none !important;
    }

    .tcs-search-skeleton__media,
    .tcs-search-skeleton__line {
        animation: none !important;
    }
}
