/* Global application styles */

/* Import Bank Gothic font for navbar */
@import url('https://fonts.cdnfonts.com/css/bank-gothic');

/* Apply Bank Gothic font to all h3, h4, h5 headers */
h1, h2, h3, h4, h5 {
    font-family: 'Bank Gothic', 'Agency FB', sans-serif !important;
    font-weight: bold !important;
}

/* Bank Gothic font class for specific elements */
.bank-gothic-font,
.bank-gothic-font * {
    font-family: 'Bank Gothic', 'Agency FB', sans-serif !important;
    font-weight: bold !important;
}

/* Navbar font styling - Bank Gothic / Agency FB Extended */
/* Exclude dropdown menus from navbar font */
.navbar {
    margin-bottom: 1em !important;
}

/* Remove navbar bottom margin when inline-subtab-bar is visible in the page */
body:has(.inline-subtab-bar) .navbar {
    margin-bottom: 0 !important;
}

.navbar,
.navbar > *,
.navbar .navbar-brand,
.navbar .nav-link,
.navbar .btn {
    font-family: 'Bank Gothic', 'Agency FB', sans-serif !important;
    font-weight: bold !important;
}

/* Reset dropdown menu to default font */
.navbar .dropdown-menu,
.navbar .dropdown-menu * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: normal !important;
}

/* Navbar color theme */
/* Main title/brand color */
.navbar .navbar-brand,
.navbar a[id*="brand"] {
    color: #757573 !important;
}

/* Navigation links color (Explore, New, Library, Documentation) */
.navbar .btn-link {
    color: #5c5c5a !important;
}

/* Navigation buttons hover effect */
.navbar .btn-link:hover {
    color: var(--bs-primary) !important;
}

/* User dropdown button in navbar - ensure transparent background always */
.navbar .dropdown-toggle.btn-primary {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.navbar .dropdown-toggle.btn-primary:hover,
.navbar .dropdown-toggle.btn-primary:focus,
.navbar .dropdown-toggle.btn-primary:active,
.navbar .dropdown-toggle.btn-primary.show {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* User dropdown button icon hover effect */
.navbar .dropdown-toggle.btn-primary:hover i.bi-person-circle {
    color: var(--bs-primary) !important;
    transition: color 0.2s ease;
}

/* Keep icon primary color when dropdown is open */
.navbar .dropdown-toggle.btn-primary.show i.bi-person-circle,
.navbar .dropdown.show .dropdown-toggle.btn-primary i.bi-person-circle {
    color: var(--bs-primary) !important;
}

/* Open dropdown on hover instead of click */
.navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.navbar .dropdown .dropdown-toggle::after {
    display: none; /* Hide the dropdown caret */
}

/* User dropdown menu item hover effects */
.navbar .dropdown-menu .dropdown-item {
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.navbar .dropdown-menu .dropdown-item:hover {
    background-color: transparent !important;
    color: var(--bs-primary) !important;
    font-weight: bold !important;
}

.navbar .dropdown-menu .dropdown-item:hover i {
    color: var(--bs-primary) !important;
}

/* User email in dropdown header */
.navbar .dropdown-menu .dropdown-header span[id*="user-email"] {
    color: var(--bs-primary) !important;
    font-weight: 600;
}

/* Prevent horizontal scrolling on all pages */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}

#_pages_plugin_container {
    overflow-x: hidden;
}

.content-overlay {
    overflow-x: hidden;
}

/* Increase max-width for larger screens */
@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 2000px;
    }
}

/* Landing page hover effects */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Remove button hover effect */
.hover-danger:hover {
    color: #dc3545 !important;
    transform: scale(1.15);
}

/* Breadcrumb icon button hover effect - turns red on hover */
.breadcrumb-icon-btn:hover {
    color: #dc3545 !important;
}

/* Autocomplete dropdown styles */
.autocomplete-item:hover {
    background-color: #f8f9fa !important;
}

.autocomplete-item:active {
    background-color: #e9ecef !important;
}

/* Prevent border change on textarea focus */
.no-focus-border:focus {
    outline: none !important;
    border: 1px solid #ced4da !important;
    box-shadow: none !important;
}

/* Custom modal width for expression upload modal - 80% screen width */
.expression-upload-modal-custom .modal-dialog {
    --bs-modal-width: 80vw;
    max-width: 80vw;
}

.expression-upload-modal-custom .modal-content {
    height: 85vh;
}

.expression-upload-modal-custom .modal-body {
    max-height: calc(85vh - 80px);
    overflow-y: auto;
}

/* Custom modal width for waterfall create table modal */
.waterfall-create-modal-custom .modal-dialog {
    --bs-modal-width: 900px;
    max-width: 900px;
}

/* Custom modal width for waterfall query modal - almost full screen */
.waterfall-query-modal-custom .modal-dialog {
    --bs-modal-width: 95vw;
    max-width: 95vw;
    height: 90vh;
}

.waterfall-query-modal-custom .modal-content {
    height: 90vh;
}

.waterfall-query-modal-custom .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Light orange background for waterfall query modal header and footer */
.waterfall-query-modal-custom .modal-header {
    background-color: rgba(253, 126, 20, 0.18);
}

.waterfall-query-modal-custom .modal-footer {
    background-color: rgba(253, 126, 20, 0.18);
}

/* ICTerminal page styles */
.terminal-hero {
    /* Keep simple spacing; no special divider so first row matches other rows */
    padding: 20px 0;
}
.terminal-hero .logo { max-height: 64px; }

/* stronger card hover and reveal description */
.terminal-card.hover-card {
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.terminal-card.hover-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 12px 36px rgba(14,30,60,0.14) !important;
    /* subtle background tint on hover with primary color */
    background-color: rgba(var(--bs-primary-rgb), 0.06);
}

.terminal-card .card-desc {
    /* Hide description by default, shown on hover */
    max-height: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 160ms ease, max-height 160ms ease;
    overflow: hidden;
    margin: 0; /* remove default paragraph margin when collapsed */
}
.terminal-card.hover-card:hover .card-desc {
    max-height: 100px; /* allow space for description text */
    opacity: 1;
    transform: translateY(0);
    margin-top: 0.5rem; /* restore spacing when visible */
}

/* small chevron appears on hover */
.terminal-card .card-link-chevron { display: none !important; }

/* placeholder for cards without github links - completely hidden */
.terminal-card .card-placeholder {
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* GitHub icons area (hidden until hover) */
.terminal-card .card-github {
    max-height: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 160ms ease, max-height 160ms ease;
    overflow: hidden;
    margin: 0;
}
.terminal-card.hover-card:hover .card-github {
    max-height: 50px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.github-icon { color: #008080; }
.card-github a:hover .github-icon { color: #ffb703; }

/* ensure cards have a consistent minimum height so rows don't jump */
.terminal-card { 
    min-height: 220px; /* increased to accommodate description + github links on hover */
    display: flex; 
    flex-direction: column; 
}
.terminal-card .card-body { 
    flex: 1 1 auto; 
    display: flex;
    justify-content: center; /* horizontally center */
}

/* The content wrapper should fill the card body and center vertically always */
.terminal-card .card-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center; /* always keep vertically centered */
    width: 100%;
}

/* icon color categories */

/* Teal + Amber palette */
/* Primary color icons */
.icon-data { color: var(--bs-primary); }
.icon-trade { color: var(--bs-primary); }
.icon-tools { color: var(--bs-primary); }
.icon-docs { color: var(--bs-primary); }

/* primary card accent */
.terminal-card.primary { border-left: 4px solid var(--bs-primary); background-color: rgba(var(--bs-primary-rgb), 0.04); }

/* focus style for keyboard users */
.terminal-card:focus-within, .terminal-card:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,128,128,0.08) !important;
}

/* Complement / warning color (amber) - used for small accent needs */
.accent-amber { color: #ffb703 !important; }

/* Gentle background tint for the terminal area if needed */
.terminal-bg-tint { background-color: #f3fbfb; }

/* If a card in the hero row was marked 'primary', remove that special accent
   so the first row visually matches other rows. This overrides any server-side
   class assignment for hero-row cards. */
.terminal-hero .terminal-card.primary,
.terminal-hero .terminal-card {
    border-left: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Landing page layout - ensure full height and footer at bottom */
/* The wrapper should account for navbar height, not be 100vh itself */
.landing-page-wrapper {
    min-height: calc(100vh - 74px); /* subtract navbar height (typical Bootstrap navbar is ~56px) */
    display: flex;
    flex-direction: column;
}

.landing-content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 1rem;
}

/* Remove padding from the navbar's content column for landing page */
#landing-landing-tab-content {
    margin-left: -12px !important;
    margin-right: -12px !important;
    margin-top: 0 !important;
}

/* Landing page footer styles */
.landing-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Social media links */
.footer-social-link {
    color: #6c757d;
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-social-link:hover {
    color: #008080;
}

/* Navigation links in footer */
.footer-nav-link {
    color: #6c757d;
    text-decoration: none;
    padding: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    border-right: 1px solid #dee2e6;
}

.footer-nav-link:last-child {
    border-right: none;
}

.footer-nav-link:hover {
    color: #008080;
}

/* Footer logo */
.footer-logo {
    height: 20px;
    opacity: 0.7;
    margin-left: 0.5rem;
}

/* Responsive footer for mobile */
@media (max-width: 768px) {
    .footer-nav-link {
        display: block;
        border-right: none;
        padding: 0.5rem 0;
        text-align: center;
    }
}

/* ICTerminal page layout and footer */
#terminal-terminal-tab-content {
    margin-left: -12px !important;
    margin-right: -12px !important;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.terminal-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 74px); /* ensure full height minus navbar */
    margin-left: -12px; /* break out of parent column padding */
    margin-right: -12px;
}

.terminal-content-wrapper {
    flex: 1 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 1rem;
}

.terminal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    margin-top: auto; /* push to bottom */
}

/* Configuration Tab - Expressions Selection Cards */
.hover-shadow {
    transition: all 0.2s ease;
}

.hover-shadow:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 128, 128, 0.2) !important;
    border-color: #008080 !important;
    background-color: #ffffff !important;
}

/* Configuration Tab - Add SL/TP Button Hover */
#config-tab-add-sl-btn:hover {
    border-style: solid !important;
    background-color: transparent !important;
    color: #dc3545 !important;
}

#config-tab-add-tp-btn:hover {
    border-style: solid !important;
    background-color: transparent !important;
    color: #198754 !important;
}

/* Configuration Tab - Advanced Parameters Accordion */
.accordion-button:not(.collapsed) {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Inline Subtab Navigation - Horizontal Design with Indent */
.inline-subtab-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0 2rem;
    padding-left: var(--subtab-indent, 2rem); /* Dynamic indent calculated by JS */
    margin-bottom: 1rem; /* Add spacing below subtab bar */
}

.inline-subtab-nav {
    display: flex;
    gap: 0;
    margin-bottom: -1px;
}

.inline-subtab {
    padding: 0.65rem 1rem !important; /* Match px-3 (1rem = 16px) */
    border: none !important;
    border-bottom: 2px solid transparent !important;
    background-color: transparent !important;
    color: #495057 !important; /* Match main navbar color */
    font-weight: bold !important; /* Remove bold */
    font-size: 0.9rem; /* Match main navbar font size */
    font-family: 'Bank Gothic', 'Agency FB', sans-serif !important; /* Use Bank Gothic font */
    transition: all 0.2s ease;
    text-decoration: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
}

.inline-subtab:hover {
    color: #495057 !important;
    background-color: rgba(255, 255, 255, 0.6) !important;
    border-bottom-color: #adb5bd !important;
}

.inline-subtab-active {
    color: var(--bs-primary) !important;
    background-color: transparent !important;
    border-bottom-color: var(--bs-primary) !important;
}

.inline-subtab-active:hover {
    color: var(--bs-primary) !important;
    background-color: transparent !important;
    border-bottom-color: var(--bs-primary) !important;
}

/* Library Tab - Icon Button Hover Effects */
#inline-folder-icon-btn:hover,
#inline-folder-icon-btn:hover i {
    color: var(--bs-primary) !important;
    transition: color 0.2s ease;
}

#inline-search-icon-btn:hover,
#inline-search-icon-btn:hover i {
    color: var(--bs-primary) !important;
    transition: color 0.2s ease;
}

#toggle-manage-mode-btn:hover,
#toggle-manage-mode-btn:hover i {
    color: var(--bs-primary) !important;
    transition: color 0.2s ease;
}

/* Library Tab - Expression Table Styles */
/* Remove Bootstrap's default table hover background */
#expressions-main-table.table-hover tbody tr:hover {
    background-color: transparent !important;
}

/* Remove Bootstrap's default table-primary background */
#expressions-main-table tbody tr.table-primary {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* On hover: change expression name color to primary */
#expressions-main-table tbody tr.simple-expression-item:hover td:nth-child(2) span {
    color: var(--bs-primary) !important;
    transition: color 0.2s ease;
}

/* On selection (table-primary): make expression name primary and bold */
#expressions-main-table tbody tr.simple-expression-item.table-primary td:nth-child(2) span {
    color: var(--bs-primary) !important;
    font-weight: bold !important;
}

/* Ensure non-selected rows have normal styling */
#expressions-main-table tbody tr.simple-expression-item:not(.table-primary) td:nth-child(2) span {
    color: rgb(44, 62, 80);
    font-weight: normal !important;
}

/* Expression Table Column Widths */
/* When checkbox column is present (manage mode) */
/* Without checkbox (normal mode) */
#expressions-main-table th:nth-child(1),
#expressions-main-table td:nth-child(1) {
    width: 60px; /* TYPE column - includes icon (1.2rem) + arrow icon (~20px) */
}

#expressions-main-table th:nth-child(2),
#expressions-main-table td:nth-child(2) {
    width: auto; /* NAME column - expands to fill */
    min-width: 200px; /* Ensure enough space for longer names */
}

#expressions-main-table th:nth-child(3),
#expressions-main-table td:nth-child(3) {
    width: 150px; /* CREATED column */
}

/* With checkbox (manage mode) - overrides above */
#expressions-main-table th:nth-child(1):has(+ th + th + th),
#expressions-main-table td:nth-child(1):has(+ td + td + td) {
    width: 45px; /* Checkbox column */
}

#expressions-main-table th:nth-child(2):has(+ th + th),
#expressions-main-table td:nth-child(2):has(+ td + td) {
    width: 60px; /* TYPE column when checkbox present */
}

#expressions-main-table th:nth-child(3):has(+ th),
#expressions-main-table td:nth-child(3):has(+ td) {
    width: auto; /* NAME column when checkbox present */
    min-width: 200px;
}

#expressions-main-table th:nth-child(4),
#expressions-main-table td:nth-child(4) {
    width: 150px; /* CREATED column (same for both modes) */
}

/* Table header - prevent text and icon wrapping */
#expressions-main-table thead th {
    white-space: nowrap;
}

/* Reduce padding for tighter rows */
#expressions-main-table tbody td {
    padding: 0.2rem 0.2rem 0.2rem 0.5rem !important;
}

/* Folder rows have larger padding */
#expressions-main-table tbody tr[id*='folder-navigate'] td {
    padding: 1rem 1rem 1rem 0.5rem !important;
}

#expressions-main-table thead th {
    padding: 0.5rem !important;
}

/* Configuration Tab - Active date preset button white text */
.date-preset-btn.btn.active.btn-outline-primary {
    color: white !important;
}

/* Configuration Tab - Active timeframe button white text */
.timeframe-btn.btn.active.btn-outline-primary {
    color: white !important;
}

/* Configuration Tab - Expression selector hover effects */
.hover-shadow:hover {
    border-color: var(--bs-primary) !important;
}

.hover-shadow:hover .bi-plus-circle,
.hover-shadow:hover span {
    color: var(--bs-primary) !important;
}

/* Configuration Tab - Center the hr separator */
#config-tab-trading-action-content hr.my-4,
#config-tab-risk-management-content hr.my-4 {
    margin-left: auto;
    margin-right: auto;
}

/* Studies Table - Footer row hover effect */
.hover-row-footer:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.hover-row-footer:hover #studies-create-new-footer-row {
    background-color: transparent;
}

.hover-row-footer:hover #studies-create-new-footer-row i,
.hover-row-footer:hover #studies-create-new-footer-row span {
    color: var(--bs-primary) !important;
}

/* Exchange Badge Styles - Inverted (transparent bg, colored border+text) */
.exchange-badge-bybit {
    background-color: transparent !important;
    border: 1.5px solid var(--exchange-bybit) !important;
    color: var(--exchange-bybit) !important;
}

.exchange-badge-hyperliquid {
    background-color: transparent !important;
    border: 1.5px solid var(--exchange-hyperliquid) !important;
    color: var(--exchange-hyperliquid) !important;
}

.exchange-badge-bybit-spread {
    background-color: transparent !important;
    border: 1.5px solid var(--exchange-bybit-spread) !important;
    color: var(--exchange-bybit-spread) !important;
}

.exchange-badge-other-spread {
    background-color: transparent !important;
    border: 1.5px solid var(--exchange-other-spread) !important;
    color: var(--exchange-other-spread) !important;
}

.exchange-badge-default {
    background-color: transparent !important;
    border: 1.5px solid var(--exchange-default) !important;
    color: var(--exchange-default) !important;
}

/* Timeframe Badge Styles - Inverted with rainbow spectrum */
.timeframe-badge-1min {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-1min) !important;
    color: var(--timeframe-1min) !important;
}

.timeframe-badge-5min {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-5min) !important;
    color: var(--timeframe-5min) !important;
}

.timeframe-badge-15min {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-15min) !important;
    color: var(--timeframe-15min) !important;
}

.timeframe-badge-30min {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-30min) !important;
    color: var(--timeframe-30min) !important;
}

.timeframe-badge-1h {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-1h) !important;
    color: var(--timeframe-1h) !important;
}

.timeframe-badge-4h {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-4h) !important;
    color: var(--timeframe-4h) !important;
}

.timeframe-badge-1d {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-1d) !important;
    color: var(--timeframe-1d) !important;
}

.timeframe-badge-1w {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-1w) !important;
    color: var(--timeframe-1w) !important;
}

.timeframe-badge-default {
    background-color: transparent !important;
    border: 1.5px solid var(--timeframe-default) !important;
    color: var(--timeframe-default) !important;
}

/* Modal close button hover effect */
.modal-header button:hover {
    color: #dc3545 !important;
    transform: scale(1.15);
}

.modal-header button:hover i {
    color: #dc3545 !important;
}

/* Studies table sticky header - two table approach */
#studies-header-table {
    border-collapse: collapse;
    border-spacing: 0;
}

#studies-main-table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove bottom border from header table since body table follows */
#studies-header-table thead tr th {
    border-bottom: 1px solid #e9ecef !important;
}

/* Ensure both tables use the same border box sizing */
#studies-header-table th,
#studies-main-table td {
    box-sizing: border-box;
}

/* Reduce vertical padding in table cells */
#studies-header-table th,
#studies-main-table td {
    padding: 0.5rem !important;
}

/* Modern table styling for proper column alignment */
.modern-table {
    table-layout: fixed !important;
    width: 100% !important;
}

.modern-table thead,
.modern-table tbody,
.modern-table tfoot {
    width: 100% !important;
}

.modern-table th,
.modern-table td {
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.modern-table col {
    box-sizing: border-box !important;
}

/* Ensure header and body tables have aligned columns */
#studies-header-table,
#studies-main-table {
    border-collapse: collapse !important;
}

#studies-header-table th,
#studies-main-table td {
    box-sizing: border-box !important;
}

/* =====================================================
   STRUCTURE BUILDER - Chat Interface Styles
   ===================================================== */

/* Loading dots animation */
@keyframes structure-blink {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0; }
}

.loading-dots .loading-dot {
    animation: structure-blink 1.4s infinite;
    font-size: 1.5rem;
    line-height: 0.5;
}

.loading-dots .loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots .loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Chat input focus state */
.chat-input:focus {
    border-color: #008080 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.25) !important;
}

/* Preview loading overlay */
.structure-preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

/* Chat container scrollbar styling */
#structure-chat-container::-webkit-scrollbar {
    width: 6px;
}

#structure-chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#structure-chat-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#structure-chat-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Clickable expression blocks in chat */
.structure-expression-block {
    transition: all 0.2s ease;
}

.structure-expression-block:hover {
    border-color: #008080 !important;
    background-color: rgba(0, 128, 128, 0.08) !important;
}

/* =====================================================
   ICVision Overview Page - Subtab Styling
   ===================================================== */

/* Style the overview subtabs (Strategy, Trades, Metrics, Notes, Compare) */
#overview-subtabs {
    border-bottom: 1px solid #dee2e6;
    background-color: transparent;
}

#overview-subtabs .nav-link {
    color: #6c757d;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
    margin-bottom: -1px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#overview-subtabs .nav-link:hover {
    color: var(--bs-primary);
    background-color: transparent;
    border-color: transparent;
    border-bottom-color: rgba(var(--bs-primary-rgb), 0.3);
}

#overview-subtabs .nav-link.active {
    color: var(--bs-primary);
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--bs-primary);
}

/* Tab content area - ensure clean background */
#overview-subtabs + .tab-content,
#overview-subtabs ~ .tab-content {
    background-color: transparent;
    border: none;
    padding-top: 1rem;
}

/* Cards inside overview tabs should have subtle styling */
#overview-subtabs ~ .tab-content .card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* =====================================================
   Preview Subtabs - Reusable ICVision-style tabs
   ===================================================== */

/* Style the preview subtabs (Config, Chart, etc.) - matches ICVision Overview tabs */
.preview-subtabs {
    border-bottom: 1px solid #dee2e6;
    background-color: transparent;
}

.preview-subtabs .nav-link {
    color: #6c757d;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
    margin-bottom: -1px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preview-subtabs .nav-link:hover {
    color: var(--bs-primary);
    background-color: transparent;
    border-color: transparent;
    border-bottom-color: rgba(var(--bs-primary-rgb), 0.3);
}

.preview-subtabs .nav-link.active {
    color: var(--bs-primary);
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--bs-primary);
}

/* Tab content area - ensure clean background */
.preview-subtabs + .tab-content,
.preview-subtabs ~ .tab-content {
    background-color: transparent;
    border: none;
    padding-top: 1rem;
}

/* Study Analysis Page - General tab improvements */
[id*="study-tab-content"] .nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

[id*="study-tab-content"] .nav-tabs .nav-link {
    color: #6c757d;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

[id*="study-tab-content"] .nav-tabs .nav-link:hover {
    color: var(--bs-primary);
    border-bottom-color: rgba(var(--bs-primary-rgb), 0.3);
}

[id*="study-tab-content"] .nav-tabs .nav-link.active {
    color: var(--bs-primary);
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--bs-primary);
}
/* Exchange radio button container styling */
.exchange-radio-container .form-check-input:disabled ~ .form-check-label {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: not-allowed;
    font-weight: 500;
    font-size: 14px;
    background-color: #f8f9fa;
    color: #adb5bd;
    opacity: 0.6;
}
