/* JurnalPost Smart Search v1.0.0 */
.header-search__form.smart-search {
    --smart-blue: #2fa4e7;
    --smart-navy: #0f2344;
    width: min(520px, calc(100vw - 40px));
    padding: 10px;
    overflow: visible;
    border: 0;
    border-top: 3px solid var(--smart-blue);
    border-radius: 16px;
    background: var(--jp-surface);
    box-shadow: 0 22px 62px rgba(7, 31, 61, 0.24);
    transition:
        width 260ms cubic-bezier(0.2, 0.75, 0.25, 1),
        box-shadow 220ms ease,
        transform 220ms ease;
}

.header-search__form.smart-search:focus-within {
    width: min(760px, calc(100vw - 40px));
    box-shadow: 0 28px 74px rgba(7, 31, 61, 0.32);
    transform: translateY(2px);
}

.smart-search__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.header-search__form.smart-search .smart-search__bar {
    display: grid;
    min-height: 58px;
    grid-template-columns: 22px minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 6px 7px 6px 18px;
    align-items: center;
    border: 1px solid #cfd9e5;
    border-radius: 999px;
    background: var(--jp-bg);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.header-search__form.smart-search .smart-search__bar:focus-within {
    border-color: var(--smart-blue);
    box-shadow: 0 0 0 4px rgba(47, 164, 231, 0.16);
}

.smart-search__icon {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #7f93ad;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.header-search__form.smart-search input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: var(--jp-ink);
    font-size: 16px;
    line-height: 1.25;
}

.header-search__form.smart-search input::placeholder {
    color: #879ab3;
    opacity: 1;
}

.header-search__form.smart-search input::-webkit-search-cancel-button {
    display: none;
}

.header-search__form.smart-search button {
    border: 0;
    cursor: pointer;
}

.header-search__form.smart-search .smart-search__clear {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border-radius: 50%;
    background: transparent;
    color: #6d8098;
    transition: background 160ms ease, color 160ms ease;
}

.header-search__form.smart-search .smart-search__clear[hidden] {
    display: none;
}

.smart-search__clear svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.9;
}

.header-search__form.smart-search .smart-search__clear:hover,
.header-search__form.smart-search .smart-search__clear:focus-visible {
    background: rgba(47, 164, 231, 0.12);
    color: var(--smart-blue);
}

.header-search__form.smart-search .smart-search__submit {
    min-width: 86px;
    height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--smart-blue), #147fc4);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(47, 164, 231, 0.24);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.header-search__form.smart-search .smart-search__submit:hover,
.header-search__form.smart-search .smart-search__submit:focus-visible {
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(47, 164, 231, 0.34);
    transform: translateY(-1px);
}

.header-search__form.smart-search .smart-search__submit:focus-visible,
.header-search__form.smart-search .smart-search__clear:focus-visible {
    outline: 3px solid rgba(47, 164, 231, 0.28);
    outline-offset: 2px;
}

:root[data-theme="dark"] .header-search__form.smart-search {
    --smart-blue: #49b6f2;
    --smart-navy: #0b111b;
    background: #151b24;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

:root[data-theme="dark"] .header-search__form.smart-search .smart-search__bar {
    border-color: #344354;
    background: #0f1722;
}

:root[data-theme="dark"] .header-search__form.smart-search .smart-search__bar:focus-within {
    border-color: var(--smart-blue);
    box-shadow: 0 0 0 4px rgba(73, 182, 242, 0.18);
}

:root[data-theme="dark"] .header-search__form.smart-search input::placeholder {
    color: #8fa1b7;
}

.search-header > .section-heading__eyebrow {
    color: #2fa4e7;
}

:root[data-theme="dark"] .search-header > .section-heading__eyebrow {
    color: #49b6f2;
}

.smart-search-home-dock {
    position: relative;
    z-index: 115;
    width: 100%;
    margin: 12px 0 16px;
    animation: smart-search-dock-enter 220ms ease both;
}

.smart-search-home-dock[hidden] {
    display: none !important;
}

.smart-search-home-dock .header-search__form.smart-search,
.smart-search-home-dock .header-search__form.smart-search:focus-within {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px;
    transform: none;
    box-shadow: 0 12px 32px rgba(7, 31, 61, 0.16);
}

.smart-search-home-dock .header-search__form.smart-search .smart-search__bar {
    min-height: 56px;
}

:root[data-theme="dark"] .smart-search-home-dock .header-search__form.smart-search {
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
}

@keyframes smart-search-dock-enter {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 901px) {
    .site-topbar .site-header__actions--desktop .header-search__form.smart-search {
        top: calc(100% + 13px);
        right: 0;
    }
}

@media (max-width: 768px) {
    .site-header__actions--mobile .header-search__form.smart-search,
    .site-header__actions--mobile .header-search__form.smart-search:focus-within {
        top: calc(100% + 8px);
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        padding: 8px;
        border-radius: 14px;
        transform: none;
    }

    .header-search__form.smart-search .smart-search__bar {
        min-height: 54px;
        grid-template-columns: 20px minmax(0, 1fr) auto auto;
        gap: 7px;
        padding: 5px 6px 5px 14px;
    }

    .header-search__form.smart-search input {
        height: 42px;
        font-size: 16px;
    }

    .header-search__form.smart-search .smart-search__clear {
        width: 32px;
        height: 32px;
    }

    .header-search__form.smart-search .smart-search__submit {
        min-width: 70px;
        height: 42px;
        padding: 0 15px;
        font-size: 13px;
    }

    .smart-search-home-dock {
        margin: 10px 0 14px;
    }

    .smart-search-home-dock .header-search__form.smart-search,
    .smart-search-home-dock .header-search__form.smart-search:focus-within {
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        padding: 7px;
        border-radius: 13px;
    }
}

@media (max-width: 380px) {
    .header-search__form.smart-search .smart-search__bar {
        grid-template-columns: 18px minmax(0, 1fr) auto auto;
        gap: 5px;
        padding-left: 11px;
    }

    .header-search__form.smart-search .smart-search__submit {
        min-width: 62px;
        padding: 0 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .smart-search-home-dock,
    .header-search__form.smart-search,
    .header-search__form.smart-search *,
    .header-search__form.smart-search *::before,
    .header-search__form.smart-search *::after {
        transition-duration: 0.01ms !important;
    }
}
