/* static/css/components.css */

/* ===== Шапка ===== */
.app-header {
    background: #141414;
    border-bottom: 1px solid #222222;
    flex-shrink: 0;
    padding: 12px 24px 0 24px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222222;
}

/* ===== Вкладки ===== */
.tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tabs {
    display: flex;
    gap: 0;
    margin-top: 0;
}

.tab {
    padding: 10px 16px 12px 16px;
    color: #7c7c7c;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    cursor: pointer;
}

.tab:hover {
    color: #e4e4e4;
}

.tab.active {
    color: #ffffff;
    border-bottom-color: #888888;
}

/* ===== Подвкладки ===== */
.sub-tabs {
    display: flex;
    gap: 0;
    margin-top: 0;
    padding-left: 16px;
}

.sub-tab {
    padding: 6px 16px 10px 16px;
    color: #7c7c7c;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    cursor: pointer;
}

.sub-tab:hover {
    color: #e4e4e4;
}

.sub-tab.active {
    color: #aaaaaa;
    border-bottom-color: #555555;
}

/* ===== Кнопка выхода ===== */
.header-logout {
    flex-shrink: 0;
    padding-bottom: 8px;
}

.logout-btn {
    padding: 6px 16px;
    background: #222222;
    color: #e4e4e4;
    border: 1px solid #333333;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.logout-btn:hover {
    background: #2a1a1a;
    border-color: #883333;
    color: #ff6666;
}

/* ===== Диалоги (общие) ===== */
.dialogs-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    background: #0d0d0d;
}

.dialog-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    cursor: pointer;
    transition: 0.15s;
    border-bottom: 1px solid #1a1a1a;
    text-decoration: none;
    color: inherit;
}

.dialog-item:hover {
    background: #1a1a1a;
}

.dialog-item:active {
    background: #222222;
}

.dialog-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2a2a2a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.dialog-info {
    flex: 1;
    min-width: 0;
}

.dialog-name {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
}

.dialog-last {
    font-size: 13px;
    color: #7c7c7c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dialog-time {
    font-size: 11px;
    color: #5a5a5a;
    flex-shrink: 0;
}

/* ===== Пустое состояние ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #5a5a5a;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-text {
    font-size: 16px;
}

/* ===== Адаптив ===== */
@media (max-width: 1024px) {
    .app-header { padding: 12px 20px 0 20px; }
    .dialog-item { padding: 12px 20px; }
}

@media (max-width: 600px) {
    .app-header { padding: 10px 14px 0 14px; }
    .logo { font-size: 17px; }
    .tab { font-size: 13px; padding: 8px 12px 10px 12px; }
    .sub-tab { font-size: 13px; padding: 6px 12px 8px 12px; }
    .sub-tabs { padding-left: 8px; }
    .logout-btn { padding: 4px 12px; font-size: 12px; }
    .dialog-item { padding: 10px 14px; }
    .dialog-avatar { width: 42px; height: 42px; font-size: 17px; }
}
