/**
 * Console2 List CSS
 * 記事一覧とメッセージ一覧で共通のスタイル
 */

/* ========================================
   フィルターエリア
   ======================================== */
.filter-area {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* ========================================
   検索ボックス
   ======================================== */
.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(81, 187, 155, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
}

.search-box .clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.search-box input:not(:placeholder-shown)+i+.clear-btn {
    opacity: 1;
}

.search-box .clear-btn:hover {
    color: var(--warning-primary);
}

/* ========================================
   ソート選択
   ======================================== */
.sort-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sort-select select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-primary) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.75rem center/1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    transition: all var(--transition-fast);
}

.sort-select select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(81, 187, 155, 0.1);
}

/* ========================================
   タグ
   ======================================== */
.p-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    height: 2em;
}

.p-tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
}

.p-tag.special {
    background: rgba(81, 187, 155, 0.1);
    border-color: rgba(81, 187, 155, 0.3);
    color: var(--accent-dark);
}

.p-tag.special:hover {
    background: var(--accent-primary);
    color: white;
}

/* ========================================
   アクションバー
   ======================================== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
}

.selection-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.selection-info strong {
    color: var(--accent-primary);
}

/* ========================================
   ページネーション
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.pagination a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
}

.pagination span.current {
    background: var(--accent-primary);
    color: white;
    border: 1px solid var(--accent-primary);
}

.pagination span.ellipsis {
    background: transparent;
    border: none;
    color: var(--text-light);
}

/* ========================================
   危険ボタン
   ======================================== */
.btn-danger {
    background: var(--warning-primary);
    color: white;
}

.btn-danger:hover {
    background: var(--warning-dark);
}

/* ========================================
   レスポンシブ（リスト用）
   ======================================== */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .sort-select select {
        flex: 1;
    }
}