/*─────────────────────────────*/
/*          Base Styles        */
/*─────────────────────────────*/
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif,-apple-system,system-ui,Segoe UI,Helvetica,Apple Color Emoji,Arial,sans-serif,Segoe UI Emoji,Segoe UI Symbol;
    background: var(--surface-0);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: hidden;
    touch-action: pan-y;
    overscroll-behavior-x: none;
    max-width: 100%;
    box-sizing: border-box;
}

body {
    padding-top: 60px;
    /* default top padding */
}

body.sticky-header {
    padding-top: 100px;
    /* when header sticks */
}

.mobile-brand {
    margin-left: 50px;
    position: fixed;
    top: 14px;
    left: 26px;
    display: none;
}

ol li, ul li {
    margin-top: 10px;
}

.flex {
    display: flex;
}

.margin-top-minus {
    margin-top: -4px;
}

    .layer {
        position: absolute;
        top: 80px;
        left: 0;
    }


/*─────────────────────────────*/
/*        Headings & Titles    */
/*─────────────────────────────*/
h1, .article-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    line-height: 1.2;
}

.brand-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--text-primary);
    ; margin: 0;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    transition: all 0.3s ease;
}

.brand-tagline {
    font-style: italic;
    font-size: 11pt;
    color: var(--text-primary);
    opacity: 0.85;
    margin: 0.25rem 0 0;
    font-family: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
    transition: all 0.3s ease;
}

.sticky .brand-title {
    font-size: 1.75rem;
}

.sticky .brand-tagline {
    font-size: 10pt;
}

/* Mobile sidebar close button */
.offcanvas-header .btn-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #ffffff;
    background-color: transparent;
    opacity: 0.9;
    filter: invert(1); /* ensures visibility on dark bg */
    font-size: 1.5rem;
}

/*─────────────────────────────*/
/*            Main             */
/*─────────────────────────────*/
main {
    padding-top: 10px;
}

/*─────────────────────────────*/
/*    Container & Content      */
/*─────────────────────────────*/



.homeTitle {
    margin-top: 2.0em;
    font-family: 'Roboto';
    font-weight: 500;
    font-size: 3em;
}

.brand-container .homeTitle {
    font-size: 1.7em;
    padding: 0px;
    margin-top: 18px;
    display: none;
    color: whitesmoke;
}

#mainTabs {
    opacity: 0;
}


/* Desktop scrolling */
.top-top-container {
    height: 100vh;
    overflow: visible;
    padding: 0px;
}

.loading-state, .error-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

/*─────────────────────────────*/
/*     Banner / Header         */
/*─────────────────────────────*/
.research-banner {
    background: linear-gradient(to bottom, #0a1c3a 0%, #000000 100%);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    padding-top: 10px;
    padding-bottom: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10110;
}

.research-banner.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 5px 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}


.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/*─────────────────────────────*/
/*    Logo & Branding Swap     */
/*─────────────────────────────*/
.brand-container {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.brand-container {
    flex-direction: column;
    margin: 0 auto 0 50px;
}

.site-logo, .site-logo-small, .site-logo-mobile {
    margin-right: 15px;
    transition: all 0.3s ease;
}

.site-logo {
    height: 140px;
}

.site-logo-small {
    height: 80px;
}

.site-logo-mobile {
    height: 40px;
}

.sticky .site-logo {
    display: none !important;
}

.sticky .site-logo-small {
    display: block !important;
}

/* Hide logo-container in mobile mode */
@media (max-width: 768px) {
    main, .main-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 10px;
        padding-right: 10px;
    }

    .research-content {
        width: 100%;
        overflow-x: hidden;
    }

    #articleBody {
        width: 100%;
        overflow-x: hidden;
    }

    .logo-container {
        display: none !important;
    }
}

/*─────────────────────────────*/
/*      Navbar Toggler         */
/*─────────────────────────────*/
.navbar-toggler {
    padding: 0.5rem;
    font-size: 1.25rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
}

.navbar-toggler:hover {
    background-color: rgba(255,255,255,0.1);
}

.conversation-list {
    margin-left: 4px;
    overflow-y: auto;
    scrollbar-color: #7d7d86 transparent;
    scrollbar-width: thin;
    max-height: 40vh;
}

/* Scrollbar styling for WebKit-based browsers */
.conversation-list::-webkit-scrollbar {
    width: 8px;
}

.conversation-list::-webkit-scrollbar-track {
    background: transparent;
}

.conversation-list::-webkit-scrollbar-thumb {
    background-color: navy;
    border-radius: 4px;
}


/*─────────────────────────────*/
/* Agent Category Tabs & Pills */
/*─────────────────────────────*/
.agent-category-tabs-wrapper {
    width: 100%;
    overflow-x: hidden;
    margin-bottom: 15px;
}

.agent-category-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: nowrap; /* keep on single line for scrolling plugin */
    white-space: nowrap;
    min-width: 300px;
    width: 100%;
    overflow-x: auto;
}

.agent-pills-category-header {
    padding: 8px 12px;
    cursor: pointer;
    text-align: center;
    flex: 0 0 auto; /* natural width for scrolling */
    white-space: nowrap;
    font-size: 1.2rem;
    border-bottom: 2px solid transparent;
    height: 80px;
}

.agent-pills-category-header.active {
    border-bottom-color: var(--text-primary);
}

.agent-pills-category {
    display: none;
    width: 100%;
}

.agent-pills-category.active {
    display: block;
}

.agent-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.idea-pills, .agent-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    width: 100%;
    overflow-x: hidden;
}

.pill {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    main, .main-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 10px;
        padding-right: 10px;
    }

    .research-content {
        width: 100%;
        overflow-x: hidden;
    }

    .homeTitle {
        margin-top: 0.1em;
    }

    #articleBody {
        width: 100%;
        overflow-x: hidden;
    }

    .a2gent-category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .agent-pills-category-header {
        font-size: 0.8rem;
    }

    .pill {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .n2av-tabs {
        max-height: 10px;
    }
}

/*─────────────────────────────*/
/*      Hidden Toolbar         */
/*─────────────────────────────*/
.research-toolbar {
    display: none;
    /* intentionally hidden */
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    justify-content: space-between;
    align-items: center;
}

.toolbar-actions {
    display: flex;
    gap: 1rem;
}

.toolbar-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    opacity: 0.8;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 1.1rem;
}

.toolbar-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

/*─────────────────────────────*/
/*        Sidebar Nav          */
/*─────────────────────────────*/
.sidebar {
    background-color: #0b0c22;
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.sidebar-nav {
    padding: 0 1.5rem;
}

.sidebar-heading {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    margin: 1rem 0;
    color: var(--text-primary);
}

.sidebar-divider {
    height: 1px;
    background-color: rgba(255,255,255,0.1);
    margin: 2rem 0;
}

.sidebar-nav .nav-link {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(10,28,58,0.1);
}

.sidebar-nav .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-item {
    margin-bottom: 5px;
}

#rightSidebar {
    padding-top: 0;
    display: flex;
    border-right:23px solid #838380;
    
}

body, header {
    border-left: 10px solid #404356;
}

.recent-articles .nav-link {
    font-size: 1.1rem;
    padding-left: 0.5rem;
    border-left: 2px solid transparent;
}

.recent-articles .nav-link:hover {
    border-left: 2px solid #0a1c3a;
}

.article-date {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/*─────────────────────────────*/
/*           Tabs              */
/*─────────────────────────────*/
#researchTabs {
    padding: 0 1.5rem;
    margin-top: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.nav-tabs .nav-link {
    color: var(--text-primary);
    font-family: ui-sans-serif,-apple-system,system-ui,Segoe UI,Helvetica,Apple Color Emoji,Arial,sans-serif,Segoe UI Emoji,Segoe UI Symbol;

    font-size: 1.0rem;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.75rem 0.25rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: rgba(10,28,58,0.3);
}

.nav-tabs .nav-link.active {
    color: var(--text-primary);
    ; border-bottom: 3px solid var(--text-secondary);
    font-weight: 600;
    background: transparent;
}

#researchTabsContent {
    padding: 0;
}

/*─────────────────────────────*/
/*           Charts            */
/*─────────────────────────────*/
.chart-container {
    padding: 0 1rem;
}

.chart-area {
    min-height: 400px;
    margin-top: 1.5rem;
    background-color: var(--surface-1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.chart-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 300px;
    color: #666;
    font-size: 1.2rem;
    text-align: center;
}

/*─────────────────────────────*/
/*         Share Modal         */
/*─────────────────────────────*/
.background-container {
    position: fixed;
    top: 0px;
    width: 100%;
    height: 100vh;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: hidden;
}

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 800px !important;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1800;
    
}

.share-modal-content {
    position: relative;
    background: var(--surface-1);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90vw;
    padding: 1.5rem;
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.share-modal-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.share-modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.share-form-group {
    margin-bottom: 1rem;
}

.share-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.share-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition);
}

.share-form-input:focus {
    border-color: var(--accent);
}

.share-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition);
}

.share-btn-primary {
    background: var(--accent);
    color: white;
}

.share-btn-primary:hover {
    opacity: 0.9;
}

.share-btn-secondary {
    background: var(--surface-2);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.share-btn-secondary:hover {
    background: var(--hover-bg);
}

.share-success {
    color: #28a745;
    margin-top: 1rem;
    text-align: center;
}

.share-error {
    color: #dc3545;
    margin-top: 1rem;
    text-align: center;
}


table tbody tr:nth-child(odd) td {
    background-color: #e1e4f5;
    color : black;
}

table tbody tr:nth-child(even) td {
    background-color: #ffffff;
    color : black;
}


table {
    border: 1px solid silver;
}

.row {
    overflow: hidden;
}

.main-left-menu-home {
    display: none;
}

.main-container {
    padding: 0px;
}

.scrollable-center {
    padding: 10px;
    overflow-y: auto;
    /* Firefox */
    scrollbar-color: #7d7d86 transparent;
    scrollbar-width: thin;
}

/* Scrollbar styling for WebKit-based browsers */
.scrollable-center::-webkit-scrollbar {
    width: 8px;
}

.scrollable-center::-webkit-scrollbar-track {
    background: transparent;
}

.scrollable-center::-webkit-scrollbar-thumb {
    background-color: navy;
    border-radius: 4px;
}

    .model-picker  {
        font-size: 1.0em;
        max-width: 90px;
        margin-top: 4px;
    }



.homeTitle {
    text-align: center;
}

input::placeholder, textarea::placeholder {
    color: #9ca3af !important;
    /* your color */
    opacity: 1;
    /* some browsers lower opacity by default */
}

@media (min-width: 769px) {
    /* Hide mobile logo on desktop */ .logo-container {
        display: flex !important;
    }
}

.symbol-link {
    cursor: pointer;
}

/* Composer Home */
.composer-row {
    position: fixed;
    z-index: 1106;
    background: #15151d;
    bottom: 25px;
    width: 100%;
    height: 400px;
}

.composer {
    bottom: 25px;
    left: 0;
    right: 0;
    height: auto;
    background: #00251a;
    padding: 10px;
    margin: 0px;
    width: 100%;
}

.composer-wrapper {
    max-width: 80%;
    height: auto;
}

.composer-input-wrapper {
    width: 100%;
    resize: vertical;
    border-radius: 15px;
    height: auto;
    display: flex;
    bottom: 115px;
    margin-left: auto;
    margin-right: auto;
}

.composer-controls {
    width: 50px;
    margin-bottom: 0px;
}

.composer-tools {
    margin-left: 20px;
}

.composer {
    background-color: transparent;
}

.composer-input {
    background-color: var(--surface-1);
    width: 90%;
}

.assistant-message .message-content {
    background: initial;
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 6px;
    box-shadow: var(--shadow);
}



.assistant-message .message-content td,.assistant-message .message-content th{
    color: black;
    
}


footer p{ 
    color: #d3cdcd;
    line-height: 1.15;
}

footer a {
    color: #f8f0f0;
}

.model-picker {
    background: initial;
    margin-left: auto;
    margin-top: 4px;
    min-width: 300px;
    xtext-align: right;
    margin-right: 20px;
}

.model-picker select option {
    background-color: blue;
}

#chatMessages {
    overflow-y: auto;
}

/* Override styles for mobile widths to ensure composer tools are visible */
@media (max-width: 640px) {
    .composer-tools {
        display: flex !important; /* ensure visibility */
        gap: 8px;
    }
    .model-picker {
        font-size: 0.75rem;
        min-width: 140px;
        max-width: 50%;
    }
}

.composer-btn.selected {
    xbackground-color: gray;
}

.home-sheet-resizer {
    flex: 0 0 6px; /* Prevent shrinking in flex layouts */
    width: 6px;
    left: 0px;
    top: 0px;
    padding: 0;
    cursor: col-resize;
    background: transparent;
    z-index: 1451;
    height: 2000px;
}

.home-sheet-resizer:hover {
    background: var(--border-medium);
}

.home-sheet-resizer.resizing {
    background: var(--primary);
}

#rightSheet {
    width: initial;
}

.LongRunningTaskStatus a {
    color: #93c5fd;
}

.userInfo {
    cursor: pointer;
}



.scrtabs-tab-scroll-arrow {
    display: initial;
    margin-top: 40px;
    xmargin-left: 10px;
    xmargin-right: 10px;
    color: white;
    border: 1px solid silver;
    border-radius: 5px;
    
}

.scrtabs-tab-scroll-arrow-left::after {
    content: "<";
}

.scrtabs-tab-scroll-arrow-right::after {
    content: ">";
}


.scrtabs-tab-container {
    display: flex;
    width: 100%;
}
.scrtabs-tab-container,
.scrtabs-tabs-fixed-container {
    height: 97px;
    padding-left: 8px;
    padding-right: 8px;
}

.scrtabs-tabs-fixed-container {
    flex: 1 1 auto;
}

.assistant-message .message-content code {
    background: #1f1f25;
    color: yellow;
}

@media (max-width: 1000px) {

    .site-logo-small {
        height: 40px;
    }
}

.scroll-to-bottom-btn {
    position: fixed;
    bottom: 190px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 11050;
}

.scroll-to-bottom-btn i {
    font-size: 1.25rem;
}

/* Ensure mobile sidebar close button (X) visible */
#sidebarMenu .btn-close {
    filter: invert(0) !important;
    color: #ffffff !important;
    opacity: 0.95;
    z-index: 11060;
}

.embedded-chart {
    border-radius: 6px;
    background: white;
    max-height: 800px;
    width: 100%;
}

.embedded-chart.full-width {
}

/*─────────────────────────────*/
 /*       Responsive Rules      */
/*─────────────────────────────*/
@media (max-width: 768px) {
    main, .main-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 0px;
        padding-right: 0px;
    }

    .mobile-brand {
        display: initial;
    }
    
    
    body.sticky-header {
        padding-top: 50px;
    }    

    body, header {
        border-left: 1px solid #404356;
    }

    .main-row {
        margin: 0px;
    }

    .layer {
        top: 50px;
    }

    footer p {
        margin-bottom: 0px;
    }

    .research-content {
        width: 100%;
        overflow-x: hidden;
    }

    #articleBody {
        width: 100%;
        overflow-x: hidden;
    }

    /* Banner mobile override */
    .research-banner {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 8px 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    .composer-wrapper {
       max-width: 100%;
    }


    body, .row, main {
        max-width: 100%;
    }

    .research-content {
        padding: 0rem;
    }
    
    #researchTabs {
        margin-top: 0rem;
    }

    body {
        padding-top: 0;
        /* override default */
    }

    /* Logo visibility */
    .site-logo, .site-logo-small {
        display: none !important;
    }

    .site-logo-mobile {
        display: block !important;
        height: 36px;
    }

    /* Branding text */
    .homeTitle {
        font-size: 1.8rem;
        margin-top: 0.5rem;
    }

    .brand-container {
        display: none !important;
    }

    .brand-tagline {
        font-size: 9pt;
    }

    .banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-actions1 {
        align-self: flex-end;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }

    /* Layout adjustments */
    .research-container {
        width: 100vw;
        max-width: 100vw;
        padding: 0;
        margin: 0;
    }

    .research-content {
        padding: 0rem;
    }

    .col-md-9 {
        width: 100%;
    }

    .model-picker  {
        font-size: 1.0em;
        max-width: 100px;
        margin-top: 4px;
    }


    .sidebar-nav {
        overflow-y: auto;
    }

}

.thinking-container {
    max-width: 300px;
    color: black;
}

.assistant-message .message-content pre {
    background: #101010;
    margin-top: 20px;
    margin-bottom: 20px;
}

.footer-disclaimer {
    
}

.hide-footer-x {
    position: fixed;
    right: 10px;
    bottom: 10px;
}

.hide-footer-x i{
    margin-top: 10px;
    margin-left: 6px;
    padding: 4px;
    border-radius: 4px;
    color: #b91111;
    background-color: #e8e7e7;
    border: 1px solid blue;
    cursor: pointer;
}

.glyphicon-chevron-left {
  font-size: 38px;
  color: #f0e5e5 !important;
}

.scrtabs-tab-scroll-arrow {
    width: 26px !important;
    height: 50px !important;
    font-size: 32px;
    border: none;
    cursor: pointer !important;
    padding:0px !important;
    scroll-events: none;
}

.scrtabs-tab-scroll-arrow.disable {
    color: gray;
}

.scrtabs-tab-scroll-arrow:hover {
    background-color: silver !important;
}

.newChat path {
    stroke: white;
}

.newChat {
    margin-left: -32px;
}

.agent-category-breadcrumbs {
    display: none;
}

.admin-tab {
    display:none;
}

.dna-modal {
    border: 2px solid lightblue;
}

.modal-dialog .btn-close i {
    color: white !important;
    margin-top: -20px;
}

#artifactModalBody {
    background: white;
}

