/* Floating Search Bar */
#wpsc-floating-search-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 600px;
    max-width: 90vw;
    display: flex;
    align-items: center;
    padding: 4px;
    z-index: 999999;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    pointer-events: auto;
    border-radius: 61px;
    background: #020B00;
}

#wpsc-floating-search-bar:focus-within {
    border-color: #00ff00;
    box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.35);
}

#wpsc-floating-search-bar.wpsc-fsb-hidden {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.wpsc-fsb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 42px;
    max-height: 42px;
}

#wpsc-fsb-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    outline: none;
    padding: 5px;
}

#wpsc-fsb-input::placeholder {
    color: #666;
}

#wpsc-fsb-send {
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    padding: 6px 24px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 51px;
    background: #26FF00;
}

#wpsc-fsb-send:hover {
    background: #00cc00;
}

#wpsc-fsb-send:active {
    transform: scale(0.95);
}

.wpsc-fsb-voice-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wpsc-fsb-voice-btn:hover {
    color: #26ff00;
    background: rgba(38, 255, 0, 0.1);
    transform: scale(1.08);
}

.wpsc-fsb-voice-btn.wpsc-voice-active {
    color: #26ff00;
    background: rgba(38, 255, 0, 0.15);
    box-shadow: 0 0 8px rgba(38, 255, 0, 0.2);
    animation: wpsc-mic-pulse 1.5s infinite;
}

/* Chatbox Popbox Container */
#wpsc-chatbot-container {
    position: fixed;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    z-index: 999999;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    border: 1px solid #26FF00;
    background: #020B00;
    box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.28), 0 4px 12px -2px rgba(0, 0, 0, 0.16);
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        right 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.3s ease,
        opacity 0.25s ease,
        box-shadow 0.3s ease,
        visibility 0s linear 0s;
}

/* Hidden Base State: Eliminates any flash on page load and enables smooth exit */
#wpsc-chatbot-container.wpsc-chatbot-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        right 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.3s ease,
        opacity 0.25s ease,
        box-shadow 0.3s ease,
        visibility 0s linear 0.25s;
}

/* Suppress all transitions on initial page mount */
#wpsc-chatbot-container.wpsc-no-transition,
#wpsc-chatbot-container.wpsc-no-transition * {
    transition: none !important;
}

/* Wide Mode (userose.ai Expanded Style - Bottom Centered 1080px) */
#wpsc-chatbot-container.wpsc-layout-wide {
    left: 50%;
    right: auto;
    bottom: 0;
    top: auto;
    transform: translateX(-50%) translateY(0) scale(1);
    width: 1080px;
    max-width: calc(100vw - 32px);
    height: 80vh;
    min-height: 540px;
    max-height: 740px;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    box-shadow: 0 -8px 24px -4px rgba(0, 0, 0, 0.25);
}

#wpsc-chatbot-container.wpsc-layout-wide.wpsc-chatbot-hidden {
    transform: translateX(-50%) translateY(60px) scale(0.96);
    opacity: 0;
    pointer-events: none;
}

/* Compact Left Side Chat Mode */
#wpsc-chatbot-container.wpsc-layout-dock-left {
    left: 24px;
    right: auto;
    bottom: 84px;
    top: auto;
    transform: translateY(0) scale(1);
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 110px);
    border-radius: 20px;
    border-bottom: 1px solid #26FF00;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.25), 0 4px 10px -2px rgba(0, 0, 0, 0.15);
}

#wpsc-chatbot-container.wpsc-layout-dock-left.wpsc-chatbot-hidden {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

/* Compact Right Side Chat Mode (Default Floating) */
#wpsc-chatbot-container.wpsc-layout-dock-right {
    right: 24px;
    left: auto;
    bottom: 84px;
    top: auto;
    transform: translateY(0) scale(1);
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 110px);
    border-radius: 20px;
    border-bottom: 1px solid #26FF00;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.25), 0 4px 10px -2px rgba(0, 0, 0, 0.15);
}

#wpsc-chatbot-container.wpsc-layout-dock-right.wpsc-chatbot-hidden {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

/* Maximized / Fullscreen Mode */
#wpsc-chatbot-container.wpsc-layout-maximized,
#wpsc-chatbot-container.wpsc-chatbot-maximized {
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    transform: none !important;
    z-index: 9999999;
    box-shadow: none !important;
}

#wpsc-chatbot-container.wpsc-layout-maximized.wpsc-chatbot-hidden,
#wpsc-chatbot-container.wpsc-chatbot-maximized.wpsc-chatbot-hidden {
    transform: scale(0.98) !important;
    opacity: 0;
    pointer-events: none;
}

#wpsc-chatbot-container.wpsc-layout-maximized .wpsc-icon-maximize,
#wpsc-chatbot-container.wpsc-chatbot-maximized .wpsc-icon-maximize {
    display: none !important;
}

#wpsc-chatbot-container.wpsc-layout-maximized .wpsc-icon-restore,
#wpsc-chatbot-container.wpsc-chatbot-maximized .wpsc-icon-restore {
    display: block !important;
}

/* Content Centering in Wide and Maximized Modes (Rose AI Aesthetic) */
#wpsc-chatbot-container.wpsc-layout-wide .wpsc-chat-history,
#wpsc-chatbot-container.wpsc-layout-maximized .wpsc-chat-history,
#wpsc-chatbot-container.wpsc-chatbot-maximized .wpsc-chat-history {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 28px 24px;
}

#wpsc-chatbot-container.wpsc-layout-wide .wpsc-chat-input-area,
#wpsc-chatbot-container.wpsc-layout-maximized .wpsc-chat-input-area,
#wpsc-chatbot-container.wpsc-chatbot-maximized .wpsc-chat-input-area {
    max-width: 860px;
    width: 100%;
    margin: 0 auto 10px;
    box-sizing: border-box;
}

#wpsc-chatbot-container.wpsc-layout-wide .wpsc-chat-message,
#wpsc-chatbot-container.wpsc-layout-maximized .wpsc-chat-message,
#wpsc-chatbot-container.wpsc-chatbot-maximized .wpsc-chat-message {
    max-width: 85%;
}

#wpsc-chatbot-container.wpsc-layout-dock-left .wpsc-chat-message,
#wpsc-chatbot-container.wpsc-layout-dock-right .wpsc-chat-message {
    max-width: 90%;
}

/* Grid layout for suggested questions depending on screen mode */
#wpsc-chatbot-container.wpsc-layout-wide .wpsc-suggestions-grid,
#wpsc-chatbot-container.wpsc-layout-maximized .wpsc-suggestions-grid,
#wpsc-chatbot-container.wpsc-chatbot-maximized .wpsc-suggestions-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

#wpsc-chatbot-container.wpsc-layout-dock-left .wpsc-suggestions-grid,
#wpsc-chatbot-container.wpsc-layout-dock-right .wpsc-suggestions-grid {
    grid-template-columns: 1fr;
}

.wpsc-chatbot-header {
    background: transparent;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2C312B;
    user-select: none;
}

.wpsc-chatbot-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpsc-chatbot-title {
    color: #FFF;
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
}

.wpsc-chatbot-subtitle {
    border-left: 0.5px solid #2C312B;
    padding-left: 12px;
    color: #B3B7B2;
    font-size: 13.5px;
    font-weight: 300;
    white-space: nowrap;
}

/* Header Controls */
.wpsc-chatbot-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wpsc-chatbot-controls button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    outline: none;
    line-height: 1;
}

.wpsc-chatbot-controls button:hover {
    background: rgba(38, 255, 0, 0.14);
    color: #26FF00;
    border-color: rgba(38, 255, 0, 0.4);
    transform: translateY(-1px);
}

.wpsc-chatbot-controls button:active {
    transform: scale(0.94);
}

.wpsc-chatbot-controls button.wpsc-btn-active {
    background: rgba(38, 255, 0, 0.16);
    color: #26FF00;
    border-color: #26FF00;
    box-shadow: none;
}

.wpsc-chatbot-controls button svg {
    display: block;
    pointer-events: none;
}

/* Floating Search Bar Hide Transition */
#wpsc-floating-search-bar.wpsc-fsb-hidden {
    transform: translateX(-50%) translateY(24px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    #wpsc-chatbot-container.wpsc-layout-wide,
    #wpsc-chatbot-container.wpsc-layout-dock-left,
    #wpsc-chatbot-container.wpsc-layout-dock-right {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 88vh !important;
        max-height: 92vh !important;
        transform: none !important;
        border-radius: 20px 20px 0 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
    }

    #wpsc-chatbot-container.wpsc-chatbot-hidden {
        transform: translateY(100%) !important;
    }

    .wpsc-chatbot-dock-btn {
        display: none !important;
    }

    .wpsc-chatbot-subtitle {
        display: none;
    }
}

.wpsc-chatbot-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.wpsc-chat-history {
    flex-grow: 1;
    padding: 24px 32px;
    overflow-y: auto;
    background: #020B00;
}

.wpsc-chat-message {
    margin-bottom: 24px;
    max-width: 88%;
    word-wrap: break-word;
    display: flex;
    font-size: 14.5px;
    font-weight: 300;
    line-height: 150%;
}

.wpsc-bot-avatar {
    width: 32px;
    height: 32px;
    background: #00ff00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.wpsc-chat-message.wpsc-bot {
    color: #fff;
    align-self: flex-start;
    align-items: flex-start;
}

.wpsc-msg-content {
    flex-grow: 1;
    color: #e2e8f0;
    font-size: 14.5px;
    line-height: 1.68;
    letter-spacing: 0.01em;
}

.wpsc-msg-content p {
    margin: 0 0 14px 0;
}

.wpsc-msg-content p:last-child {
    margin-bottom: 0;
}

.wpsc-msg-content strong,
.wpsc-msg-content b {
    font-weight: 600;
    color: #ffffff;
}

.wpsc-msg-content ul,
.wpsc-msg-content ol {
    margin: 10px 0 16px 0;
    padding-left: 22px;
}

.wpsc-msg-content ul {
    list-style-type: disc;
}

.wpsc-msg-content ol {
    list-style-type: decimal;
}

.wpsc-msg-content li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #cbd5e1;
}

.wpsc-msg-content li:last-child {
    margin-bottom: 0;
}

.wpsc-msg-content h3,
.wpsc-msg-content h4 {
    margin: 14px 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.wpsc-msg-content code {
    background: #1e293b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #38bdf8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.wpsc-msg-content a {
    color: #38bdf8;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.wpsc-msg-content a:hover {
    opacity: 0.8;
}

.wpsc-chat-message.wpsc-user {
    color: #fff;
    align-self: flex-end;
    align-items: center;
    margin-left: auto;
    border-radius: 16px 16px 6px 16px;
    background: #171717;
    display: flex;
    padding: 20px;
    align-items: center;
    gap: 10px;
    max-width: 302px;
}

.wpsc-chat-input-area {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    background: #0d0d0d;
    align-items: center;
}

#wpsc-chat-input {
    flex-grow: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 24px;
    padding: 14px 20px;
    font-size: 15px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

#wpsc-chat-input::placeholder {
    color: #6C716C;
}

#wpsc-chat-input:focus {
    border-color: #00ff00;
}

#wpsc-chat-send {
    background: #00ff00;
    color: #000;
    border: none;
    border-radius: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#wpsc-chat-send:hover {
    background: #00cc00;
}

#wpsc-chat-send:active {
    transform: scale(0.95);
}

.wpsc-voice-btn {
    background: #1a1a1a;
    color: #94a3b8;
    border: 1px solid #333;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}

.wpsc-voice-btn:hover {
    background: #252525;
    color: #26ff00;
    border-color: #26ff00;
    transform: scale(1.05);
}

.wpsc-voice-btn:active {
    transform: scale(0.95);
}

.wpsc-voice-btn.wpsc-voice-active {
    background: rgba(38, 255, 0, 0.15);
    border-color: #26ff00;
    color: #26ff00;
    box-shadow: 0 0 15px rgba(38, 255, 0, 0.4);
    animation: wpsc-mic-pulse 1.5s infinite;
}

@keyframes wpsc-mic-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(38, 255, 0, 0.6);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(38, 255, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(38, 255, 0, 0);
    }
}

.wpsc-msg-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpsc-msg-speaker-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 4px 10px;
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1;
}

.wpsc-msg-speaker-btn:hover {
    background: rgba(38, 255, 0, 0.12);
    border-color: rgba(38, 255, 0, 0.35);
    color: #26ff00;
}

.wpsc-msg-speaker-btn.wpsc-speaking {
    background: rgba(38, 255, 0, 0.18);
    border-color: #26ff00;
    color: #26ff00;
    animation: wpsc-speaker-pulse 1.6s infinite ease-in-out;
}

.wpsc-speaker-icon {
    flex-shrink: 0;
    display: block;
}

@keyframes wpsc-speaker-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(38, 255, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(38, 255, 0, 0);
    }
}

/* Typing Animation Indicator (Compact & Refined) */
.wpsc-typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.wpsc-typing-indicator .wpsc-msg-content {
    display: flex;
    align-items: center;
}

.wpsc-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    height: 26px;
    box-sizing: border-box;
}

.wpsc-typing-dot {
    width: 4.5px;
    height: 4.5px;
    border-radius: 50%;
    background-color: #26FF00;
    display: inline-block;
    animation: wpsc-typing-bounce 1.3s infinite ease-in-out both;
}

.wpsc-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.wpsc-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.wpsc-typing-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes wpsc-typing-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.35;
    }

    40% {
        transform: scale(1.1) translateY(-2px);
        opacity: 1;
    }
}

.wpsc-chat-sources {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.wpsc-sources-label {
    font-size: 11px;
    color: #666;
    font-weight: 600;
}

.wpsc-source-link {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    transition: background 0.2s;
}

.wpsc-source-link:hover {
    background: #005177;
    color: #fff;
}

/* Suggested Questions in Chat Window */
.wpsc-suggested-questions {
    margin: 6px 0 22px 46px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: wpsc-suggestions-appear 0.35s ease-out;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.3s ease, margin 0.25s ease;
    max-height: 500px;
    overflow: hidden;
}

.wpsc-suggested-questions.wpsc-suggestions-fading {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    pointer-events: none;
}

@keyframes wpsc-suggestions-appear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.wpsc-suggestions-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 2px;
}

.wpsc-suggestions-icon {
    stroke: #64748b;
}

.wpsc-suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wpsc-suggestion-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    user-select: none;
    outline: none;
    font-family: inherit;
}

.wpsc-suggestion-chip .wpsc-suggestion-sparkle {
    color: #26ff00;
    font-size: 11px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wpsc-suggestion-chip:hover {
    background: rgba(38, 255, 0, 0.12);
    border-color: #26ff00;
    color: #ffffff;
    transform: translateY(-1.5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.wpsc-suggestion-chip:hover .wpsc-suggestion-sparkle {
    transform: scale(1.25) rotate(15deg);
}

.wpsc-suggestion-chip:active {
    transform: scale(0.97);
}

@media (max-width: 600px) {
    .wpsc-suggested-questions {
        margin-left: 0;
        margin-top: 10px;
    }

    .wpsc-suggestion-chip {
        width: 100%;
        justify-content: flex-start;
    }
}

/* GPT Search Page Styling */
.wpsc-search-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

.wpsc-search-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.wpsc-brand {
    display: flex;
    align-items: center;
    margin-right: 40px;
}

.wpsc-logo-triangle {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid #ff5722;
    margin-right: 15px;
}

.wpsc-brand-text {
    font-size: 24px;
    color: #333;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.wpsc-brand-text span {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.wpsc-search-input-wrapper {
    flex-grow: 1;
    position: relative;
}

.wpsc-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

#wpsc-search-input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#wpsc-search-input:focus {
    border-color: #ff5722;
}

.wpsc-trending-section h2 {
    color: #ff5722;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.wpsc-trending-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.wpsc-pill {
    background: #f3f4f6;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.wpsc-pill:hover {
    background: #e5e7eb;
}

.wpsc-search-results {
    margin-top: 30px;
}

.wpsc-search-user-query {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.wpsc-search-user-bubble {
    background: #2a3342;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
}

.wpsc-search-ai-response {
    background: #f9f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

.wpsc-response-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    color: #555;
}

.wpsc-response-actions svg {
    cursor: pointer;
}

.wpsc-search-ai-response p {
    margin-bottom: 15px;
}

.wpsc-search-ai-response ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.wpsc-search-ai-response li {
    margin-bottom: 5px;
}

.wpsc-search-ai-response a {
    color: #ff5722;
    text-decoration: none;
}

.wpsc-search-ai-response a:hover {
    text-decoration: underline;
}

.wpsc-show-less {
    color: #ff5722;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    margin-top: 15px;
}

.wpsc-results-sources {
    margin-top: 30px;
    padding-top: 20px;
}

.wpsc-results-sources h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #111;
}

.wpsc-sources-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wpsc-source-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 15px;
    text-decoration: none;
    color: #0073aa;
    font-size: 14px;
    transition: box-shadow 0.2s, border-color 0.2s;
    width: fit-content;
    max-width: 100%;
}

.wpsc-source-box:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
    color: #005177;
}

.wpsc-source-icon-left {
    display: flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.wpsc-source-url {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
    font-weight: 500;
}

.wpsc-source-icon-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

/* Toggle Collapse Logic */
.wpsc-ai-content-wrapper {
    transition: max-height 0.3s ease;
    max-height: 2000px;
    /* arbitrary large value for expanded state */
    overflow: hidden;
}

.wpsc-collapsed .wpsc-ai-content-wrapper {
    max-height: 150px;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.wpsc-collapsed .wpsc-toggle-chevron {
    transform: rotate(180deg);
}

.wpsc-collapsed .wpsc-show-less {
    display: none !important;
}

.wpsc-chat-message.wpsc-bot p {
    margin: 0;
}