/* Header search bar: input + AI button + search button read as one control.
   --cee-search-bg is copied from the input's background by ai-search.js. */
.navbar-search.cee-ai-search-form .input-group .search-field,
.navbar-search.cee-ai-search-form .input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.navbar-search.cee-ai-search-form .input-group-btn {
    display: flex;
    margin-left: 0 !important;
}

.navbar-search.cee-ai-search-form .input-group-btn .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: var(--cee-search-bg, #181818) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.navbar-search.cee-ai-search-form .input-group-btn .btn:last-child {
    border-radius: 0 8px 8px 0 !important;
}

/* Thin divider between the AI and the search button. */
.navbar-search.cee-ai-search-form .input-group-btn .cee-ai-search-btn + .btn {
    border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
}

.navbar-search.cee-ai-search-form .input-group-btn .btn:hover,
.navbar-search.cee-ai-search-form .input-group-btn .btn:focus-visible {
    background-color: #2a2a2a !important;
}

.cee-ai-search-btn {
    cursor: pointer;
    white-space: nowrap;
}

.cee-ai-search-btn svg {
    flex-shrink: 0;
}

.cee-ai-search-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Other (mobile/widget) search forms: the button sits next to Search. */
.cee-ai-search-form:not(.navbar-search) .cee-ai-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

/* "Continue with Elevate AI" bar on search result pages. */
.cee-ai-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px;
    padding: 14px 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid #e11f27;
    border-radius: 8px;
    background: #222;
    color: #fff;
}

.cee-ai-search-bar__icon {
    display: flex;
    flex-shrink: 0;
    color: #e11f27;
}

.cee-ai-search-bar__icon svg {
    width: 24px;
    height: 24px;
}

.cee-ai-search-bar__text {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.4;
}

.cee-ai-search-bar__actions {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.cee-ai-search-bar__go,
.cee-ai-search-bar__cancel {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}

.cee-ai-search-bar__go {
    border: 1px solid #e11f27;
    background: #e11f27;
    color: #fff !important;
}

.cee-ai-search-bar__go:hover,
.cee-ai-search-bar__go:focus-visible {
    background: #c4161d;
    border-color: #c4161d;
}

.cee-ai-search-bar__cancel {
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: transparent !important;
    color: #fff !important;
}

.cee-ai-search-bar__cancel:hover,
.cee-ai-search-bar__cancel:focus-visible {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Countdown progress line along the bottom edge. */
.cee-ai-search-bar--empty::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: #e11f27;
    transform-origin: left;
    transform: scaleX(var(--cee-ai-progress, 0));
    transition: transform 1s linear;
}

.cee-ai-search-bar--stopped::after {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .cee-ai-search-bar--empty::after {
        transition: none;
    }
}

@media (max-width: 600px) {
    .cee-ai-search-bar {
        flex-wrap: wrap;
    }

    .cee-ai-search-bar__actions {
        width: 100%;
    }
}
