/* SIBU homepage search overlay */
.banner-container {
    overflow: visible;
    z-index: 5;
}

.quick-links-main.quick-links {
    padding-top: 110px;
}

.sibu-search-layer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100050;
    pointer-events: none;
    visibility: hidden;
}

.sibu-search-layer.is-active {
    visibility: visible;
}

.sibu-search-dim {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.65);
    pointer-events: auto;
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.sibu-search-layer.is-active .sibu-search-dim,
.sibu-search-dim.is-visible {
    display: block;
}

body.sibu-suggestions-open {
    overflow: hidden;
}

.sibu-search-stack {
    position: absolute;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -30px);
    width: min(760px, calc(100% - 40px));
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: inherit;
}

.sibu-search-wrap {
    position: relative;
    width: 100%;
    z-index: 20;
    overflow: visible;
    font-family: inherit;
}

.sibu-search-wrap:has(.sibu-search-panel.is-open) {
    z-index: 21;
}

.sibu-search-panel {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    border: 0;
    position: relative;
}

.sibu-search-panel.is-open {
    background: #3b82f6;
    border-radius: 28px;
    padding: 44px 18px 22px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
}

.sibu-search-panel-close {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 30;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.sibu-search-wrap:has(.sibu-search-panel.is-open) > .sibu-search-panel-close {
    display: inline-flex;
}

.sibu-search-wrap--overlay {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, calc(100% - 32px));
    z-index: 10;
    bottom: auto;
    overflow: visible;
    isolation: isolate;
    pointer-events: auto;
    opacity: 1;
    filter: none;
}

.sibu-search-wrap--overlay .sibu-search-panel,
.sibu-search-wrap--overlay .sibu-search-bar {
    opacity: 1;
    filter: none;
}

.sibu-search-wrap--overlay .sibu-search-panel {
    position: relative;
    z-index: 1;
}

.sibu-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 12px;
    background: #fff;
    border-radius: 999px;
    min-height: 58px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 45, 90, 0.16), 0 0 18px rgba(56, 127, 221, 0.28);
    pointer-events: auto;
}

.sibu-search-bar::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 0;
    padding-top: 200%;
    background: conic-gradient(from 0deg, #387FDD, #FFFFFF, #387FDD);
    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: center center;
    animation: sibu-border-spin 4s linear infinite;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}

.sibu-search-bar::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 2px;
    border-radius: inherit;
    background: #fff;
    pointer-events: none;
}

.sibu-search-panel.is-open .sibu-search-bar::before {
    visibility: hidden;
    animation: none;
}

.sibu-search-panel.is-open .sibu-search-bar {
    box-shadow: none;
}

.sibu-search-panel.is-open .sibu-search-bar::after,
.sibu-search-bar:focus-within::after {
    box-shadow: none;
    border: 0;
}

.sibu-search-bar > * {
    position: relative;
    z-index: 1;
}

@keyframes sibu-border-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.sibu-search-orb {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.55), 0 0 14px rgba(99, 102, 241, 0.35);
}

.sibu-search-orb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.sibu-search-input {
    flex: 1 1 auto;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.4;
    color: #222;
    min-width: 0;
    font-family: inherit;
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
}
.sibu-search-input:focus-visible, .sibu-search-send:focus-visible{
    outline: 0 none !important;
}
.sibu-search-input::placeholder {
    color: #9aa3af;
}

.sibu-search-send {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sibu-search-send svg {
    width: 22px;
    height: 22px;
    display: block;
}

.sibu-search-suggestions {
    display: none;
    background: transparent;
    color: #fff;
    padding: 16px 6px 4px;
    margin-top: 4px;
    border-radius: 0;
    box-shadow: none;
}

.sibu-search-panel.is-open .sibu-search-suggestions {
    display: block;
}

.sibu-search-suggestions h3 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.2px;
}

.sibu-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sibu-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.2;
    font-family: inherit;
    transition: background 0.15s ease;
}

.sibu-search-chip:hover,
.sibu-search-chip:focus {
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

.sibu-search-chip svg {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
}

.sibu-llm-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483646;
    background: #eef2f7;
    display: none;
    flex-direction: column;
}

.sibu-llm-overlay.is-visible {
    display: flex;
}

.sibu-llm-toolbar {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
    background: #0f172a;
    position: relative;
    z-index: 2;
}

.sibu-llm-overlay iframe {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    border: 0;
    display: block;
    background: #fff;
    min-height: 0;
}

.sibu-llm-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.sibu-llm-close:hover {
    background: #fee2e2;
    color: #b91c1c;
}

body.sibu-llm-open .sibu-search-dim {
    display: none;
}

body.sibu-llm-open {
    overflow: hidden;
}

#sibuSearchWrap,
#sibuLlmOverlay {
    display: none !important;
}

.sibu-chat-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483646;
    background: #fff;
    display: none;
    flex-direction: column;
}

.sibu-chat-overlay.is-visible {
    display: flex;
}

.sibu-chat-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 18px 56px 14px;
    background: #fff;
    border-bottom: 1px solid #eef1f5;
}

.sibu-chat-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    line-height: 1.2;
}

.sibu-chat-title-brand {
    color: #2563eb;
    font-weight: 600;
}

.sibu-chat-title-sep {
    color: #94a3b8;
    font-weight: 400;
}

.sibu-chat-title-sub {
    color: #64748b;
    font-weight: 400;
}

.sibu-chat-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #334155;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sibu-chat-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sibu-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 28px 24px 20px;
    min-height: 0;
    background: #fff;
}

.sibu-chat-row {
    display: flex;
    margin: 0 auto 24px;
    max-width: 920px;
    width: 100%;
}

.sibu-chat-row--user {
    justify-content: flex-end;
}

.sibu-chat-row--assistant {
    justify-content: flex-start;
}

.sibu-chat-bubble {
    max-width: min(640px, 88%);
    border-radius: 12px;
    padding: 12px 16px;
    line-height: 1.55;
    font-size: 15px;
    word-wrap: break-word;
}

.sibu-chat-bubble--user {
    background: #f2f4f7;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.sibu-chat-assistant {
    width: 100%;
    max-width: 920px;
}

.sibu-chat-assistant-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sibu-chat-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
    display: block;
}

.sibu-chat-assistant-name {
    color: #2563eb;
    font-weight: 600;
    font-size: 16px;
}

.sibu-chat-body {
    padding-left: 0;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.65;
}

.sibu-chat-working {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sibu-chat-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sibu-chat-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    animation: sibu-chat-dot 1.2s ease-in-out infinite;
}

.sibu-chat-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.sibu-chat-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes sibu-chat-dot {
    0%, 80%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.sibu-chat-working-text {
    color: #334155;
    font-size: 15px;
}

.sibu-chat-rewrite {
    margin-bottom: 8px;
    font-size: 13px;
    color: #64748b;
}

.sibu-chat-funds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.sibu-chat-fund {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
    border: 1px solid #dbeafe;
}

.sibu-chat-answer a {
    color: #2563eb;
}

.sibu-chat-answer strong,
.sibu-chat-answer b {
    font-weight: 700 !important;
    color: #0f172a;
}

.sibu-chat-answer em {
    font-style: italic;
}

.sibu-chat-answer code {
    font-family: Consolas, "Courier New", monospace;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.92em;
}

.sibu-chat-answer h3,
.sibu-chat-answer h4 {
    margin: 14px 0 8px;
    font-size: 16px;
    font-weight: 700 !important;
    line-height: 1.35;
    color: #0f172a;
}

.sibu-chat-answer ul {
    list-style: disc !important;
    list-style-position: outside;
    padding-left: 22px !important;
    margin: 8px 0;
}

.sibu-chat-answer ol {
    list-style: decimal !important;
    list-style-position: outside;
    padding-left: 22px !important;
    margin: 8px 0;
}

.sibu-chat-answer li {
    display: list-item !important;
    margin: 4px 0;
}

.sibu-chat-answer ul > li {
    list-style-type: disc !important;
}

.sibu-chat-answer ol > li {
    list-style-type: decimal !important;
}

.sibu-chat-answer p {
    margin: 0 0 12px;
}

.sibu-chat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.sibu-chat-table th,
.sibu-chat-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: left;
}

.sibu-chat-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
}

.sibu-chat-table td {
    color: #1f2937;
}

.sibu-chat-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.sibu-chat-citation {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
}

.sibu-chat-citation:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.sibu-chat-disclaimer {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.sibu-chat-error {
    color: #b91c1c;
}

.sibu-chat-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 14px 14px;
    background: #fff;
    border-top: 1px solid #eef1f5;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.sibu-chat-composer {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 14px 8px 10px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid #93c5fd;
    box-shadow: none;
    margin: 0;
}

.sibu-chat-composer-orb {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
}

.sibu-chat-composer-orb img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.sibu-chat-followup-input {
    flex: 1 1 auto;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 15px;
    line-height: 1.4;
    color: #1f2937;
    min-width: 0;
    font-family: inherit;
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
}

.sibu-chat-followup-input::placeholder {
    color: #94a3b8;
}

.sibu-chat-restart {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #93c5fd;
    background: #fff;
    color: #2563eb;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.sibu-chat-restart:hover {
    background: #eff6ff;
}

.sibu-chat-restart svg {
    display: block;
}

#sibuSearchWrap {
    display: none;
}

@media (max-width: 767px) {
    .sibu-search-stack {
        width: calc(100% - 24px);
        transform: translate(-50%, -10px);
    }

    .quick-links-main.quick-links {
        padding-top: 100px;
    }

    .sibu-search-bar {
        min-height: 50px;
        padding: 8px 12px 8px 10px;
    }

    .sibu-search-input {
        font-size: 14px;
    }

    .sibu-search-suggestions {
        padding: 12px 4px 0;
        max-height: none;
        overflow: visible;
    }

    .sibu-search-wrap--overlay {
        width: calc(100% - 20px);
        top: 50%;
        max-height: 88vh;
        overflow: visible;
    }

    .sibu-search-wrap:has(.sibu-search-panel.is-open) {
        padding-top: 44px;
    }

    .sibu-search-panel.is-open {
        padding: 16px 12px 16px;
        border-radius: 22px;
        max-height: calc(88vh - 48px);
        overflow: auto;
    }

    .sibu-search-panel-close {
        top: 19px;
        right: -4px;
        width: 40px;
        height: 40px;
        z-index: 40;
    }

    .sibu-search-panel-close svg {
        width: 20px;
        height: 20px;
    }

    .sibu-llm-overlay {
        top: 70px;
    }

    .sibu-llm-toolbar {
        flex-basis: 44px;
        padding: 0 10px;
    }

    .sibu-chat-overlay {
        top: 70px;
    }

    .sibu-chat-header {
        padding: 14px 48px 12px;
    }

    .sibu-chat-title {
        font-size: 16px;
    }

    .sibu-chat-messages {
        padding: 20px 14px 16px;
    }

    .sibu-chat-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px 16px;
        gap: 10px;
    }

    .sibu-chat-restart {
        justify-content: center;
    }
}
