/* ====================================
   Tab Components
   ==================================== */

/* Main Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}

.tab {
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--bg-primary);
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-tab-inactive);
    box-shadow: var(--shadow-raised);
    transition: all 0.2s ease;
    font-weight: 700;
}

.tab.active {
    background: var(--bg-primary);
    color: var(--text-tab-active);
    font-weight: 700;
    box-shadow: var(--shadow-inset-tab);
    border: 1px solid var(--border-tab-active);
    text-shadow: none;
}

/* Message Tabs */
.message-tabs-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    min-height: 42px;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.message-tabs-header .section-title {
    flex: 0 0 auto;
}

.message-tabs-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-label-red);
    white-space: nowrap;
}

.message-tabs {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.m-tab {
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--bg-primary);
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: center;
    box-shadow:
        3px 3px 8px rgba(120, 140, 160, 0.28),
        -3px -3px 8px rgba(255, 255, 255, 0.45);
    flex: 0 0 auto;
    white-space: nowrap;
}

.m-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 700;
    box-shadow:
        inset 2px 2px 5px rgba(163, 177, 198, 0.32),
        inset -2px -2px 5px rgba(255, 255, 255, 0.45);
}

.message-tabs-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.message-tabs-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.message-tabs-scroller {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    padding: 4px 2px 6px;
    scroll-behavior: smooth;
}

.message-tabs-scroller::-webkit-scrollbar {
    height: 5px;
}

.message-tabs-scroller::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 999px;
}

:root[data-theme="dark"] .m-tab {
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .m-tab.active {
    box-shadow: inset 3px 3px 7px rgba(0, 0, 0, 0.65);
}
