/* ========================================
   Author Tabs Block - Frontend & Editor Styles
   ======================================== */

/* === Frontend Styles === */

.mcb-author-tabs {
    margin: 24px 0;
}

/* Навигация табов */
.mcb-author-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mcb-author-tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
}

.mcb-author-tab-button:hover {
    color: #333;
    background: #f5f5f5;
}

.mcb-author-tab-button.active {
    color: #1e88e5;
    border-bottom-color: #1e88e5;
}

/* Аватар автора */
.mcb-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mcb-author-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: inline-block;
}

/* Текстовая колонка: имя автора */
.mcb-author-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

/* Панели табов */
.mcb-author-tabs-content {
    min-height: 100px;
}

.mcb-author-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.mcb-author-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* === Editor Styles === */

.mcb-author-tabs-editor {
    background: #fafafa;
}

/* Навигация в редакторе */
.mcb-author-tabs-nav-editor {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.mcb-author-tab-button-editor {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    border-radius: 4px 4px 0 0;
    transition: all 0.15s ease;
}

.mcb-author-tab-button-editor:hover {
    background: #f0f0f0;
    color: #333;
}

.mcb-author-tab-button-editor.active {
    background: #fff;
    color: #1e88e5;
    border-color: #1e88e5;
    border-bottom-color: #fff;
}

.mcb-author-tab-button-editor.hidden {
    opacity: 0.5;
    border-style: dashed;
}

.mcb-hidden-badge-editor {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 2px;
}

.mcb-author-score-editor,
.mcb-author-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 6px;
    margin-left: 4px;
    border-radius: 10px;
    background: var(--mca-color-accent, #1e88e5);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.mcb-author-avatar-editor {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.mcb-author-avatar-placeholder-editor {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: inline-block;
}

.mcb-add-tab-button-editor {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px dashed #ccc;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.mcb-add-tab-button-editor:hover {
    border-color: #1e88e5;
    color: #1e88e5;
}

/* Контент в редакторе */
.mcb-author-tabs-content-editor {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 4px 4px;
    padding: 16px;
    min-height: 150px;
}

/* === Mobile Responsive === */

@media (max-width: 600px) {
    .mcb-author-tabs {
        margin: 16px 0;
    }

    /* Навигация - горизонтальный скролл */
    .mcb-author-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
        padding-bottom: 2px;
        margin-bottom: 16px;
    }

    .mcb-author-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    /* Компактные кнопки табов */
    .mcb-author-tab-button {
        padding: 8px 12px;
        font-size: 13px;
        gap: 6px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Меньший аватар */
    .mcb-author-avatar,
    .mcb-author-avatar-placeholder {
        width: 28px;
        height: 28px;
    }

    /* Имя автора - полностью */
    .mcb-author-name {
        white-space: nowrap;
    }
}

@media (max-width: 400px) {
    /* Еще компактнее на очень маленьких экранах */
    .mcb-author-tab-button {
        padding: 6px 10px;
        font-size: 12px;
    }

    .mcb-author-avatar,
    .mcb-author-avatar-placeholder {
        width: 24px;
        height: 24px;
    }
}
