/* Left Tab Bar Styles */
.tab-header {
    width: 100%;
    background: #d9d9d9;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 0;
    padding: 0;
    flex-shrink: 0;
    /* Prevent header from shrinking */
}

.tab-container {
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 7px 0 0 4px;
    margin: 0 auto;
}

.tab-button {
    border: none;
    border-radius: 4px 4px 0 0 !important;
    min-width: 84px;
    height: 32px;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 100%;
    letter-spacing: -0.5px;
    box-shadow: none;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F0F0;
    color: #595959;
}

.tab-button.active {
    background: #2980B9;
    color: #FFFFFF;
}

.tab-button:hover {
    opacity: 0.8;
}

.tab-button.active:hover {
    background: #1f5f8b;
}

.tab-button:not(.active):hover {
    background: #e0e0e0;
}

/* Make the third container use flexbox for proper height distribution */
#third {
    display: flex;
    flex-direction: column;
    height: calc(100% - 8px);
    /* Subtract margin top and bottom */
}

/* Tab content should fill remaining space */
.tabcontent {
    flex: 1;
    overflow: hidden;
    min-height: 0;
    /* Important for flexbox to work properly */
}

/* Action filter scroll - hide scrollbar but keep scroll functionality */
.action-filter-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    cursor: grab;
    user-select: none;
}

.action-filter-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.action-filter-scroll:active {
    cursor: grabbing;
}

/* Action buttons (plus, cog) */
.action-btn {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px !important;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    padding: 0;
}

.action-btn img {
    width: 12px;
    height: 12px;
}

/* Category buttons */
.category-btn {
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    border-radius: 4px !important;
    height: 22px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 100%;
    letter-spacing: -0.5px;
    cursor: pointer;
    flex: 0 0 auto;
}

.category-btn.active {
    background: #E5EFF7;
    color: #2980B9;
    border: 1px solid #2980B9;
}

/* Chevron button */
.chevron-btn {
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    border-radius: 4px !important;
    height: 22px;
    padding: 0 8px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chevron-btn img {
    width: 12px;
    height: 12px;
}

/* Layout border radius - Higher specificity */
div#first {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
    overflow: hidden !important;
    height: calc(100% - 8px) !important;
    /* Subtract margin top and bottom */
}

div#second {
    border-radius: 4px !important;
    overflow: hidden !important;
    height: calc(100% - 8px) !important;
    /* Subtract margin top and bottom */
}

div#third {
    border-top-left-radius: 4px !important;
    border-bottom-left-radius: 4px !important;
    overflow: hidden !important;
}

/* Market summary bar extracted styles */
.market-summary-bar {
    width: 100%;
    padding: 8px;
    background: var(--Background-Layout-2, #F5F5F5);
    border-radius: 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    display: inline-flex;
}

.market-summary-row {
    align-self: stretch;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    /* keep one line when enough space, wrap to two when not */
}

.market-summary-row.center {
    justify-content: center;
    align-items: center;
}

.market-summary-row.start {
    justify-content: center;
    align-items: flex-start;
}

/* clusters to control wrapping behavior */
.market-summary-left,
.market-summary-right {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    /* keep items in a cluster on one line */
}


.market-summary-group {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4px;
    display: flex;
}

.market-summary-text {
    color: var(--Text-Text-Primary, black);
    font-size: 12px;
    font-weight: 400;
    word-wrap: break-word;
}

.market-summary-divider {
    color: var(--Text-Text-Tertiary, #8C8C8C);
    font-feature-settings: 'liga' off, 'clig' off;

    /* Body 3/Regular/12px */
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: -0.5px;
}

.market-summary-up {
    color: var(--Colors-Color-Price-Price-Up, #1AA67C);
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    word-wrap: break-word;
}

.market-summary-max {
    color: var(--Colors-Color-Price-Price-Max, #BE00BE);
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    word-wrap: break-word;
}

.market-summary-fix {
    color: var(--Colors-Color-Price-Price-Fix, #E78B03);
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    word-wrap: break-word;
}

.market-summary-down {
    color: var(--Colors-Color-Price-Price-Down, #F5222D);
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    word-wrap: break-word;
}

.market-summary-min {
    color: var(--Colors-Color-Price-Price-Min, #088DB7);
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    word-wrap: break-word;
}

.arrow-rotate {
    transform: rotate(260deg);
    margin-left: 2px;
}