/* Header search: the trigger stays in the theme header; the form opens on demand. */
.srkc-header-search {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    margin-inline-start: auto;
    position: relative;
    z-index: 100;
}

.srkc-header-search-toggle {
    align-items: center;
    background: #fff7f8;
    border: 1px solid #c13a64;
    border-radius: 50%;
    color: #c13a64;
    cursor: pointer;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    transition: background-color 150ms cubic-bezier(.16, 1, .3, 1), color 150ms cubic-bezier(.16, 1, .3, 1), transform 120ms cubic-bezier(.16, 1, .3, 1);
    width: 44px;
}

.srkc-header-search-toggle:focus-visible,
.srkc-header-search-form input[type="search"]:focus-visible,
.srkc-header-search-form button:focus-visible {
    outline: 2px solid #c13a64;
    outline-offset: 2px;
}

.srkc-header-search-toggle:active,
.srkc-header-search-form button:active {
    transform: translateY(1px);
}

.srkc-header-search-icon {
    border: 2px solid currentColor;
    border-radius: 50%;
    display: block;
    height: 15px;
    position: relative;
    width: 15px;
}

.srkc-header-search-icon::after {
    background: currentColor;
    border-radius: 2px;
    bottom: -4px;
    content: "";
    height: 2px;
    position: absolute;
    right: -6px;
    transform: rotate(45deg);
    transform-origin: left center;
    width: 8px;
}

.srkc-header-search-panel[hidden] {
    display: none;
}

.srkc-header-search-panel {
    background: #fff;
    border: 1px solid #c13a64;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(35, 42, 50, .14);
    box-sizing: border-box;
    padding: .8rem;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(380px, calc(100vw - 24px));
}

.srkc-header-search-panel-label {
    color: #4f5661;
    display: block;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.35;
    margin-block-end: .45rem;
}

.srkc-header-search-form {
    align-items: stretch;
    display: flex;
    gap: .5rem;
    margin: 0;
}

.srkc-header-search-form input[type="search"] {
    background: #f7f8fa;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    box-sizing: border-box;
    color: #2f343b;
    flex: 1 1 auto;
    font-size: .9rem;
    min-height: 44px;
    min-width: 0;
    outline: 2px solid transparent;
    outline-offset: 1px;
    padding: .65rem .75rem;
}

.srkc-header-search-form input[type="search"]::placeholder {
    color: #707985;
}

.srkc-header-search-form input[type="search"]:hover {
    background: #f1f3f5;
}

.srkc-header-search-form input[type="search"]:focus {
    border-color: #c13a64;
}

.srkc-header-search-form input[type="search"][aria-invalid="true"] {
    border-color: #a92d3b;
}

.srkc-header-search-form button {
    background: #c13a64;
    border: 1px solid #c13a64;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: .86rem;
    font-weight: 700;
    min-height: 44px;
    padding: 0 .9rem;
    transition: background-color 150ms cubic-bezier(.16, 1, .3, 1), transform 120ms cubic-bezier(.16, 1, .3, 1);
    white-space: nowrap;
}

.srkc-header-search-toggle[aria-disabled="true"],
.srkc-header-search-form button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

@media (hover: hover) and (pointer: fine) {
    .srkc-header-search-toggle:hover {
        background: #fdebed;
        color: #c13a64;
        transform: translateY(-1px);
    }

    .srkc-header-search-form button:hover {
        background: #aa2f56;
    }
}

/* One canonical desktop rail: AFFINGER's own menu and one search control. */
@media print, screen and (min-width: 60rem) {
    #st-menuwide.srkc-canonical-nav {
        background: #fff;
    }

    #st-menuwide.srkc-canonical-nav-fixed {
        background: #fff;
        border-bottom: 1px solid #e6e6e6;
        box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
        box-sizing: border-box;
        left: 0;
        margin: 0 !important;
        max-width: none !important;
        position: fixed !important;
        right: 0;
        top: 0;
        width: 100vw !important;
        z-index: 100001;
    }

    body.admin-bar #st-menuwide.srkc-canonical-nav-fixed {
        top: 32px;
    }

    #st-menuwide.srkc-canonical-nav #st-menuwide-fixed {
        align-items: stretch;
        display: flex;
        margin: 0 auto;
        max-width: 1100px;
        width: calc(100% - 32px);
    }

    #st-menuwide.srkc-canonical-nav-fixed #st-menuwide-fixed {
        max-width: 1200px;
        width: calc(100vw - 48px);
    }

    .srkc-canonical-nav-brand {
        color: #c13a64;
        display: none;
        font-size: .95rem;
        font-weight: 800;
        letter-spacing: .02em;
        line-height: 1.2;
        overflow: hidden;
        text-decoration: none;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #st-menuwide.srkc-canonical-nav-fixed .srkc-canonical-nav-brand {
        align-items: center;
        display: flex;
        flex: 0 1 190px;
        min-width: 0;
        padding-inline: .25rem 1.25rem;
    }

    #st-menuwide.srkc-canonical-nav #st-menuwide-fixed > nav {
        flex: 1 1 auto;
        margin: 0;
        max-width: none;
        width: auto;
    }

    #st-menuwide.srkc-canonical-nav-fixed #st-menuwide-fixed > nav {
        min-width: 0;
    }

    #st-menuwide.srkc-canonical-nav #st-menuwide-fixed > .srkc-header-search {
        align-items: center;
        border-left: 1px solid #f0f0f0;
        display: flex;
        flex: 0 0 52px;
        justify-content: center;
        margin: 0;
    }

    #st-menuwide.srkc-canonical-nav #st-menuwide-fixed > .srkc-header-search .srkc-header-search-toggle {
        height: 40px;
        width: 40px;
    }

    .srkc-canonical-nav-brand:focus-visible {
        outline: 2px solid #c13a64;
        outline-offset: 3px;
    }
}

@media print, screen and (max-width: 59.99rem) {
    #headbox {
        position: relative;
    }

    #headbox > .srkc-header-search {
        margin-inline-end: .5rem;
    }

    .srkc-header-search-panel {
        width: min(380px, calc(100vw - 24px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .srkc-header-search-toggle,
    .srkc-header-search-form button {
        transition: none;
    }
}
